Magento – How to get the list of applied filters using getActiveFilters

layered-navigationmagento-1.9

I am working on the layered navigation. i am trying to get the list of applied filters using getActiveFilters of the block Mage_Catalog_Block_Layer_State.

I am trying to understand how getActiveFilters function works but not getting.

Please Help me how can i get getActiveFilters in magento.

I am trying this on the custom cms page.which is not working.

This code is working on the category page.

Best Answer

From: https://stackoverflow.com/questions/11862967/magento-get-selected-filter-in-layered-navigation

$appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();

Also check this: How do i get active filters in observer method? is it useful in your case?

Related Topic