B-219 Sec-55 Noida, India
+918010221733

Show subcategories on category page

<?php
$_helpernew = Mage::helper(‘catalog/category’);
 $_subcategories = $_category->getChildrenCategories();?>
                <?php if (count($_subcategories) > 0): ?>
                    <ul>
                        <?php foreach($_subcategories as $_subcategory): ?>
                            <li>
                                <a href=”<?php echo $_helpernew->getCategoryUrl($_subcategory) ?>”>
                                    <?php echo $_subcategory->getName() ?>
                                </a>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                <?php
                                                               
endif;
                                                               
?>
(Visited 28 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.