My categories and subcategories hierarchy to a product listing page :
- Products
- Refrigerator
- back-bar fridges
- Product listing(here)
- back-bar fridges
- Refrigerator
Now, what i'm trying to get is while i'm in product listing page i want to get all the parent categories and subcategories with respective links.
I got answer from this question
But, i failed to get all parent items (subcategories and subcategories)
$path = $category->getPath();
What i get is : 0(root)/2(Magento root)/444(products)
And it escapes all the middle subcategories. In my case it escaped Refrigerator/backbar fridges
Best Answer
this will show like breadcrum.
I know this is quite old, but I'd like to share my solution anyway as it doesn't override/clone any core files.
Create an Observer.php in /app/code/local///Model/
Add the following to your Observer.php:
I hope this will help you.