Pages

Wednesday, 12 November 2014

Magento Category listing under default category

<?php
$category = Mage::getModel('catalog/category')->getCategories(2);
    foreach($category as $_category){

    $currentCat = Mage::getModel('catalog/category')->load($_category->getId()); ?>
     <a href="<?php echo $currentCat->getUrl(); ?>"><span><?php echo $currentCat->getName()?></span></a><br/>
         <?php
        }
?>

No comments:

Post a Comment