0
点赞
收藏
分享

微信扫一扫

Magento: 产品页面获取 attribute set name How do I get attribute set name?

Soy丶sauce 2023-04-28 阅读 26


Whenever you have a product object, you can access its attribute set like this:

$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($product->getAttributeSetId());
$attributeSetName  = $attributeSetModel->getAttributeSetName();
$attributeSetId    = $attributeSetModel->getAttributeSetId()

 

OR

$attributeSetName = Mage::getModel('eav/entity_attribute_set')->load($_product->getAttributeSetId())->getAttributeSetName()

 

举报

相关推荐

0 条评论