Custom Product Attributes in Magento

Magneto has the provision to add custom attributes, for various kind of information we would like to attach to a product.

The process of adding an attribute, is very simplified.

to add an attribute, follow the steps below:

Step 1 :navigate to “Catalog > Attributes > Manage Attributes”.

Step 2: Click on the “Add new Attribute” link.

Step 3: Fill up all the information, on the add page, as below, according to your requirement:

Step 4 : Save Attribute.

Step 5 : Navigate to “Catalog > Attributes >Manage Attribute Sets”

Step 6 : Edit the “Default” attribute set.

Step 7 : Drag ‘n Drop your attribute(found at the right most column), to the group you would like it to appear on product page.

Step 8 : Save the changes.

Step 9 : Re-Index the Magento store, to see your changes on the product page.

Its done, the new attribute would appear on the product page.

How to use the custom attribute on front-end:

the attribute’s value can be fetched on the front-end, simply by using the following line of code:

echo $_product->getAppFormat();

for attributes of type “Dropdown/Multiple Select”, use the below mentioned line of code to fetch values:

echo $_product->getAttributeText('app_format');

NOTE : Make sure your attribute field “Visible on Product View Page on Front-end”


2 thoughts on “Custom Product Attributes in Magento

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your 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