If flat categories are enabled in your Magento store, you need to load the child categories of a given category differently. The following code shows how:
|
1 2 3 4 5 |
$category = Mage::getModel('catalog/category')->load($id); $childCategories = $category ->getCollection() ->addAttributeToSelect(array('name', 'image', 'description')) ->addIdFilter($category->getChildren()); |
Loading child categories with flat categories enabled
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.