In Magento Layered Navigation, how do I get all the elements for active filters?

As soon as the filter becomes active, it returns 0 elements, so it will no longer appear in the "PURCHASE OPTIONS" section. For my custom layered navigator, I need to get and show these elements. I know that some extensions already do this (and provide checkboxes next to the element), but I would like to know how to do it myself.

+3
source share
2 answers

If you want your layered navigation filters to appear when the results for the filter are 0, you only need to go to edit the product attributes and set Use in layered navigation = Filter (no result).

+1
source

, , . "" , , , (. app\design\frontend\base\default\template\catalog\layer\state.phtml filter.phtml). , , app\code\core\Mage\Catalog\Model\Layer, app\code\core\Mage\Catalog\Model\Resource\Eav\Mysql4\Layer\Filter\Attribute.php. , , ... Zend Select mysql, , , .

, AJAX Layered Navigation ( ).

Magento, , , ...

+1

Source: https://habr.com/ru/post/1780746/


All Articles