I had a main category (parent category) whose id = 10. I want to echo just its sub-categories. How can I do that?
load($parentCategoryId);
$subcats = $cat->getChildren();
// Get 1 Level sub category of Parent category
foreach(explode(',',$subcats) as $subCatid)
{
$_category = Mage::getModel('catalog/category')->load($subCatid);
if($_category->getIsActive()) {
echo '';
}
}
?>
If you want 2 level , 3 Level, 4 Level or n Level subcategories of parent category than Click Here