magento 获得root categories

$root_id = Mage::app()->getStore()->getRootCategoryId();
$categories = Mage::getModel('catalog/category')->getCategories($root_id);

获得分类名称

foreach($categories as $sub_cat){
echo $sub_cat->getName();
}

posted on 2014-08-21 14:18  怕淹死的鱼  阅读(108)  评论(0编辑  收藏  举报

导航