protected function attributeExists($entityType, $attributeCode) { $codes = \Mage::getModel('eav/config')->getEntityAttributeCodes($entityType); return in_array($attributeCode, $codes); }