March 12, 2016
Magento: 获取类别所有子类别 (无限级别-目录树) Get All Sub Categories
生成分类目录树(Category Tree)
$rootcatId = Mage::app()->getStore()->getRootCategoryId();
$categories = Mage::getModel('catalog/category')->getCategories($rootcatId);
function get_categories($categories)
{
$array = '<ul>';
foreach ($categories as $category) {
$cat = Mage::getModel('catalog/category')->load($ca… Read More