1

I trying to get list layer filters option in Magento 1 in custom file name is list_layer_options.php. This is my source:

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

It's return array(0), so how can get list layer option. Thanks!

1 Answer 1

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

foreach ($appliedFilters as $filter) {
    var_dump($filter->getName());
}
7
  • Thanks Price, it return array(0) {} so not foreach
    – xanka
    Sep 11, 2018 at 15:04
  • Basically have you some filter in your layered navigation ?
    – PЯINCƎ
    Sep 11, 2018 at 15:13
  • brand, sales, color, price.
    – xanka
    Sep 12, 2018 at 2:37
  • And you well that filters in front ?
    – PЯINCƎ
    Sep 12, 2018 at 8:12
  • no, I asked how do get it?
    – xanka
    Sep 13, 2018 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.