Wish there were some friendly template tags don’t ya? Yeah you aren’t in WordPress-land anymore.
Need to show the category name anywhere?
Here you go:
$categoryobject = Mage::registry(‘current_category’);
$category=$categoryobject->getName();
I can’t take the credit for this one though, I actually found the object reference over here. He got me the object, I just added the line to grab out the name from the object. Many thanks to Richard for the post.
Many thanks for this, I needed to know, how to load category object anywhere, this works like a charm!
Thank you very much… Looking for a long time!!!
thank you so much ,and how can i get the last category name if the product have 4 master category id ?