public function getEntityAttribute($attributeCode, $groupId) { $entityAttribute = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($attributeCode)->setAttributeGroupFilter($groupId)->getFirstItem(); return $entityAttribute; }