$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;//子分类的图片
}
magento 获得子分类的链接,名称和图片
时间: 2024-10-08 06:59:35