$categoryIds = $_product->getCategoryIds();
if(count($categoryIds) ){
$firstCategoryId = $categoryIds[0];
$_category = Mage::getModel('catalog/category')->load($firstCategoryId);
echo $_category->getName();
}
magento 获得产品所属分类
最新推荐文章于 2019-07-24 12:42:00 发布