首页 > 代码库 > magento 获得子分类的链接,名称和图片

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;//子分类的图片

}