Thursday, 22 June 2017

get attribute id from attribute code.

If you want to get attribute id from attribute code, use following code.

 $attributeId = Mage::getResourceModel('eav/entity_attribute')
    ->getIdByCode('catalog_product', 'small_image');



No comments:

Post a Comment