Thursday, 6 August 2015

how to get parent Category Id by sub category - Magento

echo $cat_idd = $this->getCurrentCategory()->getParentCategory()->getId();

=============================================
$pre_cat        =       Mage::getModel('catalog/category')->load($catarry[0]);
       
        $cat_idd   = $pre_cat->getParentCategory()->getId();

No comments:

Post a Comment