Announcement

Collapse
No announcement yet.

override sort order for just one category

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    override sort order for just one category

    I have my CTGY page set to sort by best selling. This makes sense for most of my store except for one category. New Products should sort by the newest.

    I want to do something like this on the CTGY template:
    Code:
    <mvt:if expr="(l.settings:category:id EQ 'new-products') AND (ISNULL g.sort_by)"><mvt:assign name="g.Sort_By" value="'newest'"/></mvt:if>
    but that won't work becuase g.sort-by is set to 'bestselling' by miva.

    I also want the customer to be able to set their own sort order if they want. So I can't just force g.sort_by = newest.

    I'm using the Readytheme navigation and have the link to ctgy. other wise I'd guess I could link to new-products.html?sort_by=newest
    or something like that.

    So how do I do this?

    #2
    umm... the link was the answer. duh! It's time for bed.

    Comment


      #3
      You could also use an alternative page template with a different sort. That way, folks wouldn't need to rely on the link to get the proper sort.
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        I tried to use the readytheme product listing. becuase what I really want is the 50 newest products in the store, sorted by newest.
        But then adding paging and facets to the readytheme product listing became a big bother.
        also I tried a ctgy template copy... that too seemed a lot of work. Though I agree a template is a better solution. I am using a templated feed to reset what is assigned to the new-products category and to set a custom field to display a "New" flag on all those items (the script resets the older ones to not have the flag too).

        It seems to me, that since we can override what facets are used on each ctgy, we should be able to override the default sort_by too. or even the default image type.
        In the templates there are if then statements for category custom fields that aren't installed... and by simply adding those, it is possible to control a lot of things. Why not the default sorting and the other variables set at the ctgy template? Miva? I am going to copy this over to dream features. It doesn't sound too hard to implement.

        Comment

        Working...
        X