$_categoryIds = $_product->getCategoryIds();
foreach ($_categoryIds as $_categoryId) {
$_category = Mage::getModel('catalog/category')->load($_categoryId);
$_category_name = $_category->getName();
$_category_url = $_category->getUrlPath();
break;
}
Magento根据产品(Product)获取类别(Category)名字及URL
最新推荐文章于 2022-04-28 10:43:20 发布