$subCatid=12 ;// sub category which you want to find parent category;
$parentCatid = Mage::getModel('catalog/category') ->load($subCatid)->getParentId();
Updated 29 February 2024
$subCatid=12 ;// sub category which you want to find parent category;
$parentCatid = Mage::getModel('catalog/category') ->load($subCatid)->getParentId();
Be the first to comment.