/ Published in: PHP
URL: http://www.magentocommerce.com/boards/viewthread/19476/P15/#t273207
Expand |
Embed | Plain Text
<?php $category = Mage::getModel('catalog/category'); $tree = $category->getTreeModel(); $tree->load(); $ids = $tree->getCollection()->getAllIds(); foreach($ids as $id) { if($id != 1) { $cat = Mage::getModel("catalog/category")->load($id); $subcats = $cat->getChildren(); if ($subcats) { ?> <?php { $_category = Mage::getModel('catalog/category')->load($subCatId); if($_category->getIsActive()) { $caturl = $_category->getURL(); $catname = $_category->getName(); } } ?> <?php } } } ?>
You need to login to post a comment.
