0

How I can get all attributes group name of a specific eav resource model?

3

1 Answer 1

0

You can get the all attribute group by below code.

$entityType = 4; //catalog_product
$attributeSetTableWithPrefix = Mage::getSingleton("core/resource")->getTableName('eav_attribute_set');

$groups = Mage::getResourceModel('eav/entity_attribute_group_collection');
$groups->getSelect()->joinLeft(array('attribute_set' => $attributeSetTableWithPrefix), 'main_table.attribute_set_id = attribute_set.attribute_set_id', array())
->where('attribute_set.entity_type_id = ?', 4);

$attributeGroup = array();
foreach($groups as $group){
    $attributeGroup[]= $group->getAttributeGroupName();
}
var_dump($attributeGroup);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.