Magento - Get the Current Category
Need to get the current category loaded? No problem! Just use this useful little snippet below. It will return an object of the current category.
<?php
$currentCategory = Mage::registry('current_category');
?>
i love your little magento...
i love your little magento zend php posts. they are very informative. please dont stop! i have very little zend experience and these are very helpful for my magento projects
Daniel, Thanks!...
Daniel, Thanks!
Thanks, God I hate static and...
Thanks,
God I hate static and implicit interfaces.
These snippets are great......
These snippets are great... they've helped me multiple times -- thanks!
Acrobatic, Thanks!...
Acrobatic, Thanks!
Dumb question sorry but, how...
Dumb question sorry but, how do I show this now on the product page? echo doesn't work
Enes, if you still need to...
Enes, if you still need to know:
Mage::registry('current_category')->getName()will get you the name.
There's an error on product...
There's an error on product page when you search a product. How to fix that bug?
Thanks for the snippet, I'm...
Thanks for the snippet,
I'm searching for a way to give the main div an id what's chances whit the category
can i also get the title ore description this way
i tried
Mage::registry('current_category')->getTitle();but this doesn't work
Thanks.I was doing using loop...
Thanks.I was doing using loop but your solution is perfect.
Really very useful blog. It...
Really very useful blog. It save my lots of time.
Thanks
Works perfect Many thanks...
Works perfect
Many thanks 
Post new comment