RSS

How do I get a list of active filters?

30 Mar

<?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: , , , , , , , , ,

2 responses to “How do I get a list of active filters?

  1. Production House jakarta

    Jan 31, 2014 at 5:59 am

    Incredible! This blog looks exactly like my old one!
    It’s on a totally different subject but it has pretty much the same page layout and design.
    Superb choice of colors!

     
  2. baby neck rash

    Jun 19, 2014 at 7:13 am

    naturally like your web site but you have to test the spelling on several of
    your posts. Many of them are rife with spelling issues
    and I find it very troublesome to tell the truth then again I will
    certainly come back again.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: