Wednesday, September 14, 2011

How to get Parent category id in Magento?

Here is the code to get parent category id.
$current_category = Mage::registry('current_category');
echo $parent_id = $current_category->parent_id; 

No comments:

Post a Comment