Display sub categories on main category page+Magento

Magento
display sub-categories instead of products on main category page+magento If you want to display Sub Categories list on main category or parent category in magento. So this artical may be help ful to you for design and display subcategories on parent category page+magento. => Copy the Category.php file from core to local. Create any directories required under app/code/local. (This is so images can be displayed) [sourcecode language="plain"] $ cp app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php app/code/local/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php [/sourcecode] => Add -addAttrbuteToSelect('image') to getChildrenCategories function [sourcecode language="plain"] public function getChildrenCategories($category) { $collection = $category->getCollection(); /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */ $collection->addAttributeToSelect('url_key') ->addAttributeToSelect('name') ->addAttributeToSelect('image') ->addAttributeToSelect('all_children') ->addAttributeToSelect('is_anchor') ->addAttributeToFilter('is_active', 1) ->addIdFilter($category->getChildren()) ->setOrder('position', 'ASC') ->joinUrlRewrite() ->load(); return $collection; } [/sourcecode] => Add or modify the category view template app/design/frontend/yourdiractory_path/default/template/catalog/category/view.phtml [php] <?php $_category = $this->getCurrentCategory(); $collection = Mage::getModel('catalog/category')->getCategories($_category->entity_id); $rootcat = $_category->entity_id; $cat =…
Read More