RSS

Tag Archives: magento layered navigation active filters

How do I get a list of active filters?

<?php /*Create filter dependencies*/

$_activeFilters[] = array();

$_filters = Mage::getSingleton(‘Mage_Catalog_Block_Layer_State’)->getActiveFilters();

foreach ($_filters as $_filter):?>
<?php echo $this->stripTags($_filter->getLabel()) ?><a href=”<?php echo $_filter->getRemoveUrl() ?>” title=”<?php echo $this->__(‘Remove This Item’) ?>”><?php echo $this->__(‘Remove This Item’) ?></a>
<?php endforeach; ?>

 

in this way you can get list of all active filters and placed them any catalog template files..

 

 
2 Comments

Posted by on Mar 30, 2012 in Magento, PHP

 

Tags: , , , , , , , , ,

 
%d bloggers like this: