2

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')
1

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()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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