2

When I have products in categories ( I have sub-categories in this category) I don't have sort by category just sort by price. I want to add sort by category with sort by price.

For example :

if i have computer category and i have laptop and Desktop sub-categories. I have many products also in computer category. When i am in computer catalog i wish to show also in navigation layer :

Sort by
 Category :
   Laptop(1)
   Desktop(2)

What is the problem ?

  • $_categoryList->setOrder('category_column_name','asc'); it should be something like this. – Mr_Green Nov 1 '13 at 10:12
  • which file to edit ? – Amirov Nov 1 '13 at 10:17
  • Is it a third party module that is responsible for showing the categories? Or is it the default top navigation that's causing troubles? If it's the default top navigation, does it work with base/default template? – mrumair.com Dec 15 '14 at 5:30
2

Why don't you use logic like this

when we use order by as single column we have result as

primary sort                         secondary sort 
1.  50 | This article rocks          | Feb 4, 2009    3.
2.  35 | This article is pretty good | Feb 1, 2009    2.
3.  5  | This Article isn't so hot   | Jan 25, 2009   1.

AFTER using following query

    
ORDER BY article_rating, article_time DESC

which will result as

primary sort                         secondary sort
1.  50 | This article rocks          | Feb 2, 2009    3.
1.  50 | This article rocks, too     | Feb 4, 2009    4.
2.  35 | This article is pretty good | Feb 1, 2009    2.
3.  5  | This Article isn't so hot   | Jan 25, 2009   1.

Hope above will help you.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.