we have some 2000 products ,each product has it's own description.

I want to display attribute Label values under product's description .

assume attribute Labels are "Phone , Computer, Television, Radio".

for product 1 & product 2....product 2000, above 4 attribute values are different.

if i enter the attribute values in admin panel , it should display those values under description in table format in frontend.

if there is only 3 attribute values for product 1, than only 3 attribute values should display under "product description". screenshot

let me know if you need any clarifications.

thanks in advance....

  • 1
    Can you provide a screenshot? I think Magento already offers what you need. In the default theme before 1.9 the attributes were displayed under the description if I remember correctly. – Marius Jan 27 '15 at 12:10
  • now "mobile, computer, television, radio " are texts. but I want to make it as attributes and want to display attributes values under product description in table format as in the link.... – Baby in Magento Jan 27 '15 at 12:46
  • hi marius, I attached the screenshot, let me know if you need any other details.... – Baby in Magento Jan 28 '15 at 10:23

If you add attributes under Catalog > Manage Attributes > Attributes you can set Visible on Product View Page on Front-end to yes.

Now after adding it to the attribute set and adding values per product the attributes and their value should be displayed on the front end on the product page.

As to placing them under the description. Normally they would be placed under the Additional information tab so you'll have to move it. I'm going to assume you're using the RWD theme but per custom theme it may differ.

For the RWD theme you'll see the following lines of XML in the catalog.xml around line 224

<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>Description</value></action>
<block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>Additional Information</value></action>

Add the following to your local.xml

    <reference name="product.info">
        <remove name="product.attributes"/>
    <reference name="product.description">
        <block type="catalog/product_view_attributes" name="description_attributes" template="catalog/product/view/attributes.phtml"/>

Now copy catalog/product/view/description.phtml for the base/default template to your own template and edit to include

<?php echo $this->getChildHtml('description_attributes');?>

where ever you like your attributes. And that should be it

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.