Is there a way to control the sort order of CATEGORIES displayed in the layered navigation?
For example, I have a category called “Fruit” and within that I have sub categories called Apples, Bananas and Oranges. I can control the display sort order for the sub categories by dragging the sub categories around in the “category admin panel” to display correctly i.e.
Fruit
---- Apples
---- Bananas
---- Oranges
However, when displaying the sub-categories in the “SHOP BY” category layered navigation, I don’t seem to be able to control the sort order.
I could not find any option to make the categories appear in the order you defined them. But you can modify /app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php.
Just add addAttributeToSort(’position’, ‘asc’) sorting criteria to the function that loads the child categories collection that will be used in the Shopping Filter block.
The solution to your problem is in the product attributes. Open an attribute and look for the box that refers to the display order and adjust according to your tastes
Unless I am completely misunderstanding what you are telling me, all that does is change the sort order of the attributes of a product, not the sort order of categories in layered navigation.
What you are referring to is the way they are displayed in the product info entry page. I am talking about the way categories in the layered navigation are being shown. I think that is what you are talking about. It took me awhile to find it too. It is listed in the particular attribute under “Frontend Properties” listed as “position” the lower the number the higher up it shows.
Under which product attribute? How can changing a product’s attribute change the sort order of a category in layered navigation? Products and categories are separate entities.
Is there confusion about the term “layered navigation”?
If you look at the image attached to the first post in the thread, I have exactly the same issue.
I can drag sub-categories around in “Category Management” and it will change the display order of the sub-categories in the frontend top menu bar. However, it does not change the display order of those same categories in the “Shop By Category” box on the left side of the page when viewing the parent category.
1. Open your attribute.
2. On the properties tab that it opens to, look for “Position” under Frontend Properties.
That # effects what order the layered navigation is in.
Edit: But upon reading again, you were talking about the categories - if you sort the order they’re in for the main navigation, will that do what you want it to?
yes its the categories that dont work as you would like. Even if you re-order in the backend by the nice drag and drop feature, its doesnt re-order accordingly for the layered nav for the categories. As I said, the only way I could fix it was to delete the problematic category and recreate it. Then it worked fine.