Magento 1 – How to Get Attribute Title from Different Store View

attributesfrontendmagento-1multistore

I have one attribute for two different product types. That attribute shoudl call 'x' in product type 1 and 'y' in product type 2. I created two different store views so i can name my attribute in two ways. Now how i can display this two different names. Now i'm getting attribute name by

   attr = Mage::getSingleton("eav/config")->getAttribute(Mage_Catalog_Model_Product::ENTITY, $attrCode);

   $attr->getData('frontend_label')

Best Answer

Use getStoreLabel method.

This will return you label for current store view

$attr->getStoreLabel();

Or you can pass as parameter store id to get some specific label

$attr->getStoreLabel($storeId);

For details look into Mage_Eav_Model_Entity_Attribute::getStoreLabel()