Magento – Magento 2: Left Category Sidebar from Sebwite (copy of question)

category-viewlayered-navigationmagento2

I am trying to create left sidebar category navigation for my website. But it shows only default category. It does not show any other subcategories.

I activated all category is_anchor, and re-indexing also setup flat category. but still having the same issue any help.

enter image description here

Best Answer

If you open sidebar.php, you will see, in the function getChildCategoryView to fetch the subcategories funtion getSubcategories is called. The function getSubcategories will return children Nodes only if you enable "Use Flat Catalog Category" in the Admin settings.

1.You have to enable "Use Flat Catalog Category"

2.Run re-indexing command. php bin/magento indexer:reindex

3.Flush Cache php bin/magento cache:flush

Related Topic