Tuesday 5 March 2013

get Category children id magento


<?php
$cat = Mage::getModel('catalog/category')->load(2);  /*load category*/
 $subcatcollection = $cat->getChildren();
$subcatrgories = explode(",",$subcatcollection);    /* it gives string , convert in array */
?>

No comments: