<?php
$_cat = new Mage_Catalog_Block_Navigation();
$curent_cat = $_cat->getCurrentCategory();
$curent_cat_id = $curent_cat->getId();?>
Now you can get Parent Category Id.
write the code given below to get the Id
<?php
$parentId=Mage::getModel('catalog/category')->load($curent_cat_id)->getParentId();
echo
$parentId; // $parentId will print your current category's parent Id
?>
Không có nhận xét nào:
Đăng nhận xét