get product group names and attribute set name by loading attbute set id
$product = Mage::getModel('catalog/product')->load(16);
//attribute set model.
$model = Mage::getModel('eav/entity_attribute_set');
// product attribute set id.
$attributeSetId = $product->getAttributeSetId();
$attributeSet = $model->load($attributeSetId);
// This is attribute set name.
$attributeSetName = $attributeSet->getAttributeSetName();
$groups = Mage::getModel('eav/entity_attribute_group')
->getResourceCollection()
->setAttributeSetFilter($attributeSetId)
->setSortOrder()
->load();
foreach ($groups as $group)
echo $groupName = $group->getAttributeGroupName();
}
$product = Mage::getModel('catalog/product')->load(16);
//attribute set model.
$model = Mage::getModel('eav/entity_attribute_set');
// product attribute set id.
$attributeSetId = $product->getAttributeSetId();
$attributeSet = $model->load($attributeSetId);
// This is attribute set name.
$attributeSetName = $attributeSet->getAttributeSetName();
$groups = Mage::getModel('eav/entity_attribute_group')
->getResourceCollection()
->setAttributeSetFilter($attributeSetId)
->setSortOrder()
->load();
foreach ($groups as $group)
echo $groupName = $group->getAttributeGroupName();
}
Comments
Post a Comment