1

I want to show Product listing sort data on left side on catalog page on front-end.

enter image description here

Mage::getModel('catalog/category')->load('CATEGORY ID')->getAvailableSortBy() returns empty array and if i manually select each sort option from category then it prints array with options .

1 Answer 1

1
Mage::getSingleton('catalog/config')->getAttributeUsedForSortByArray();

will get you all available attributes.

Keep in mind that this will override any "per category"/"per scope" sort by.

1
  • thanks @Yiorgos this works . This also worked for me : Mage::getModel('catalog/category_attribute_source_sortby')->getAllOptions()
    – Seefan
    May 27, 2016 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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