3

I have been looking a way to get all the layered navigation filters available, i dont know if this is per category or if i cant get all of them, because i need them on the admin side to choose in each category which ones i want to use, but currently i have been just able to get them in the front end when a category is selected by this line:

 $appliedFilters = Mage::getSingleton('Mage_Catalog_Block_Layer_State')->getActiveFilters();
2

If you simply want to get all attributes that are set as filterable via the admin section then you need to filter on the table catalog_eav_attribute where the column is_filterable is true:

/** @var Mage_Catalog_Model_Resource_Product_Attribute_Collection $attributeCollection */
$attributeCollection = Mage::getResourceModel('catalog/product_attribute_collection');
$attributeCollection->addFieldToFilter('is_filterable', true);
| 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.