magento 获得子分类的链接,名称和图片

$subcategories = Mage::getModel('catalog/category')->getCategories($current_category_id);

foreach($subcategories as $cat){

$cat->getName();//名称

Mage::helper('catalog/category')->getCategoryUrl($cat);//子分类的链接

$img_path = Mage::getModel('catalog/category')->load($cat->getId())->getThumbnail();

Mage::getBaseUrl('media').'catalog/category/'.$img_path;//子分类的图片

}

posted on 2014-08-06 16:26  怕淹死的鱼  阅读(187)  评论(0编辑  收藏  举报

导航