1

I would like to show the brand, discount and category filters in the toolbar. I want to show it like this - Sort by - category - Brand - Discount - in the toolbar above the category products. Please help me i am a new to magento. I tried to echo filter.phtml in toolbar.phtml and list.phtml but it doesn't seems to pick the code, tried to change it through xml but no help at all. I don't know what else to do, please help. Thanks in advance..

1

The sort by attributes are built in the function Mage_Catalog_Model_Resource_Config::getAttributesUsedForSortBy. What happens here is that the attributes are selected from the table eav_attribute with a join on the catalog_eav_attribute table.

The key here is that it filters on the table catalog_eav_attribute and looks for attributes with the column used_for_sort_by set to true.

| improve this answer | |
1

To add this functionality, you should overwrite Mage_Catalog_Block_Product_List_Toolbar block and Mage_Catalog_Model_Resource_Product_Collection model

Click here for reference

| 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.