B-219 Sec-55 Noida, India
+918010221733

Get The Root Category In Magento

<?php
$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$_category = Mage::getModel(‘catalog/category’)
         ->load($rootCategoryId);
// You can then get all of the top level categories using:
$_subcategories = $_category->getChildrenCategories();
?>
(Visited 51 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.