how to rename the attribute’s label for front-end Magento

Sometime there need to be a situation to change the default attributes name for the front-end. In that case the all of the custom theme don’t have the pre-work for this. We have to make it with replace the following code ….

In
app/design/frontend/YOURPACKAGE/YOURTHEME/template/catalog/product
/view/type/options/configurable.phtml in line 35 for my case

if the file not there then please check in

app/design/frontend/base/default/template/catalog/product/view
/type/options/configurable.phtml

and you may copy it to the theme and Change the following code inside the line

echo $_attribute->getLabel()

To

echo $_attribute->getProductAttribute()->getStoreLabel()

Then you should get the Label you set in Default Store View section of the attribute in admin

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s