All the applied filters are stored in layer state object. You can easily retrieve them by using the following snippet:
$appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();
foreach ($appliedFilters as $item) {
$item->getName(); // Name of the filter
$item->getLabel(); // Currently selected value
$item->getFilter()->getRequestVar();
}
No comments:
Post a Comment