Get categories trail on catalog page
-
16-10-2019 - |
Question
For example I'm on boots catalog page: Shoes > Womens > Boots
If I add this code:
$category = Mage::getBlockSingleton('catalog/navigation')->getCurrentCategory();
It'll return only Boots
category. How can I get full trail programatically starting from Shoes
?
Thank you.
Solution
Try looping through the result of
Mage::helper('catalog')->getBreadcrumbPath()
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange