2

After a few minutes of search, I found the solution that I'm looking for, and it's here: How can I disable filter "category" from Sidebar

I followed this method by editing the catalog.xml by @PandaWebStudio

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>

with

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
<action method="unsetChild"><child>category_filter</child></action>
</block>

But sadly, It didn't work. I then scrolled down and found another solution by @Maurice

The (currently) recommended way to make layout changes is using a theme's local.xml. So when using local.xml, add the following:

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

And if you want, you can add the regular (non-filterable) category menu above the filters like by adding the following to your local.xml:

<catalog_category_layered>
    <reference name="left">
        <block type="catalog/navigation" name="catalog.leftnav.categories" after="currency" template="catalog/navigation/left.phtml"/>
    </reference>
    <reference name="catalog.leftnav">
        <action method="unsetChild"><child>category_filter</child></action>
    </reference>
</catalog_category_layered>

It worked. It removed my category filter in the layered navigation. But the problem is, the poll and mini cart appear. And the contents of the page disappeared. Only the poll and mini cart appear in my page, there are no products and static content anymore.

I wonder where did I went wrong. I tried change the after="currency" to before="-" because that's what is inside my XML, but it still didn't work. I think I just need to modify something in the after value, because I don't have a currency block in my sidebar. That's what I don't know.

I hope a Magento guru can enlighten me. :(

2
  • Are you clearing your cache? I tried your XML update on a pretty much vanilla 1.9 RWD install and had 0 problems. Perhaps you nicked a tag in one of your edits? imgur.com/DFNuH4z Aug 8, 2014 at 0:19
  • Yes I'm clearing my cache. I'm using a custom theme in Magento 1.9. Maybe a conflict in my custom theme? Here the site and the page where I want the category nav filter to disappear, but I can't: powerplantv2.jehzlau.net/women.html
    – jehzlau
    Aug 8, 2014 at 2:34

2 Answers 2

4

jehzlau,not need xml code,If you make this category Is anchor is No the it automatically call

        <catalog_category_default translate="label">
        <label>Catalog Category (Non-Anchor)</label>
        <reference name="left">
            <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
        </reference>
.....

which is used for non-anchor category

If want using xml try this

<catalog_category_layered>
    <reference name="left">
    <remove name="catalog.leftnav" />
        <block type="catalog/navigation" name="catalog.leftnav.categories" after="currency" template="catalog/navigation/left.phtml"/>
    </reference>
</catalog_category_layered>
1
  • Whhhoaaa! Genius! That worked. I just remove the reference block for non-anchor and it worked like magic! Hahaha! Thanks Amit!
    – jehzlau
    Aug 8, 2014 at 4:19
0

just go tot a category in Magento admin >>> go to custom design tab >>> Add te following code in "custom layout update" field...

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

Your category filter will be gone for that specific category. Repeat this action to remove category filter from other categories...

enjoy...

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.