Display sub category list with name/title & url:
$catID = 33;
$datas = array();
$children = Mage::getModel(‘catalog/category’)->load($catID)->getChildren();
$children = explode(“,”,$children);
foreach ($children as $category) {
//echo $category->getName();
$mod = Mage::getModel(‘catalog/category’)->load($category);
$datas[] = array(
“id”=>$category,
“name”=>$mod->getName(),
“url”=>$mod->getUrl(),);
}print_r($datas);
Be First to Comment