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

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

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


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


Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.