3

Category filters are not appearing in Layered Navigation. I am not using any plugin for layered navigation. Attribute and Price filters are appearing.

I have set Is Anchor and Show In Navigation to YES for all the categories. I have read other answers on stackexchange as well. No idea why this is happening.

In app/code/core/Mage/Catalog/Block/Layer/View.php (Line 207)
return $this->getChild('category_filter'); is returning NULL.

3
  • 1
    You are using a template maybe there are some problems with the xml files, check category.xml and your custom xml file for this template, block should be included here. You can also try to switch back to the default Package / Theme from Magento and see if the Cat filter appears. Mar 5, 2015 at 11:34
  • 1
    Have you searched all layout files in app/design for category_filter to ensure they aren't removing the block? Mar 5, 2015 at 12:02
  • thanks guys! I solved it. See the answer below. Thanks Cags, Marius and Samir :-)
    – Hashid
    Mar 5, 2015 at 15:08

1 Answer 1

6

Thanks Cags! I did a whole search and found out, one of the xml files was removing the category_filter by the unsetChild method. Thanks a ton.

So the answer is, if you stumble upon such errors, do a full file search with the block name, and you will find the culprit "xml" file which may be removing the block forcefully.

In my case this happened:

<catalog_category_layered>
        <reference name="catalog.leftnav">
            <action method="unsetChild"><name>category_filter</name></action>
        </reference>
</catalog_category_layered>

Your Answer

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

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