1

Layered Navigation shows all categories. I have the category structure as below:

-Default Category(8)
    -Flowers(5)
       Rose(2)
       Lotus(3)
    -Fruits(3)
       Apple(2)
       Orange(0)
       Grapes(1)

If I click the category Fruits from the main navigation all categories are displayed in layered navigation. Like this:

   Flowers
   Rose
   Lotus
   Fruits
   Apple
   Orange
   Grapes

But I need to display only the subcategories of the selected category (here Fruits) in layered navigation. Expected result is:

Apple
Orange
Grapes

How can I do this?

To display layered navigation what I did is: In Catalog > Manage Categories > (Category name) > Display settings change Is Anchor to Yes.

4
  • can you show us code? May 25, 2015 at 9:07
  • I not change any code(i don't know how to change) May 25, 2015 at 9:30
  • how you able to get all categories? May 25, 2015 at 9:33
  • when I apply layered navigation all categories are displayed.. May 25, 2015 at 9:41

1 Answer 1

1

Finally got the answer!!!

In app\design\frontend\[template]\[template]\layout\catalog.xml in Category layered navigation layout section,

I changed

<block type="catalog/navigation" name="catalog.leftnav1" before="currency" template="catalog/navigation/left_nav.phtml"/>

to

<block type="catalog/navigation" name="catalog.leftnav1" before="currency" template="catalog/navigation/left.phtml"/>

And now its working as required.

1
  • Hi, I am using Magento2.1 I want to display categories in layeed navigation.Can you guide me where I can use this code?
    – kiran
    Nov 8, 2018 at 14:50

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.