Related Posts
About me
Hello, my name is Richard Castera. I have more than 12 years of experience architecting, implementing, leading and launching large scale, high performance software products in a fast-paced agile environment.
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.
1 |
<?php $currentCategory = Mage::registry('current_category'); ?> |
Hello, my name is Richard Castera. I have more than 12 years of experience architecting, implementing, leading and launching large scale, high performance software products in a fast-paced agile environment.
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
but this doesn’t work
Magento 1.7.0.2
its working fine on localhost but showing error on live site.
error: call to function getProductCollection() on a non-object.
so what will the problem??
if i used
instead of
then its working fine but my output going to wrong ….
so
have any parameter where i can load current category of product on product page or(realated page)
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
Thanks,
God I hate static and implicit interfaces.
These snippets are great… they’ve helped me multiple times — thanks!
Dumb question sorry but, how do I show this now on the product page? echo doesn’t work
There’s an error on product page when you search a product. How to fix that bug?
Thanks.I was doing using loop but your solution is perfect.
Really very useful blog. It save my lots of time.
Thanks
Works perfect
Many thanks 
Thanks
Excellent, thanks!
Hello,
is there an alternative way to get the current category? In my case the result of Mage::registry(‘current_category’) is empty!