$product_id = Mage::registry('current_product')->getId();
$_product = Mage::getModel('catalog/product')->load($product_id);
/*1.gei the groupid of product*/
$attributes = $_product->getAttributes();
foreach($attributes as $attribute)
{
$group_id = $attribute->getData('attribute_set_info/' . $_product->getAttributeSetId() . '/group_id');
$group = Mage::getModel('eav/entity_attribute_group')->load($group_id);
var_dump($group->getData('attribute_group_name'));
}
/*2.show the group code and value*/
$collections = array();
$attributesCollection = Mage::getResourceModel('catalog/product_attribute_collection');
$attributesCollection->setAttributeGroupFilter($group_id);
magento获取相应名字的属性集
最新推荐文章于 2018-05-21 20:01:00 发布