Magento – How to get Available Product Listing Sort By category data on front end

magento-1.9

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 .

Best Answer

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.

Related Topic