Pages

Wednesday, 11 July 2012

how to show all child category according to possion in magento

<?php
$cats = Mage::getModel('catalog/category')->load(3)->getChildrenCategories();
?>
<ul>
<?php foreach($cats as $category): ?>
    <li>
        <a href="<?php echo $category->getUrl() ?>"><?php echo $category->getName() ?></a>
    </li>
<?php endforeach; ?>
</ul>

No comments:

Post a Comment