The following code will provide the necessary steps for fetching the sub-category id's under selected category.
//this will return the category object
$_category = Mage::getModel('catalog/category')->load($categoryId);
$subcategoryIds = array();
//This will return the list of category id's under specified category
$subcategoryIds = split(",", $_category->getChildren());
No comments:
Post a Comment