1. Home
  2. Prices
  3. Guided Tour
  4. New Shop
  5. Shop Review
  6. Ecommerce Marketing
  7. Ecommerce TV
  8. Magento Developers
  9. Portfolio
  10. Blog
  11. Contact
Home > Magento > Adding Attribute List To Product View

Adding Attribute List To Product View

Posted on: 12th Mar 2010 By: Adam Moss Leave a comment No Comments

In a recent blog entry I explained how to echo product attributes on the product page, by using a simple calling script. That’s fine and well, but what if you want to echo a large amount of attributes in one go – the type of data that normally is shown in the ‘Additional Info’ tab on the product page. With a couple of simple XML edits, that’s very easy to do:

First open app/design/frontend/base/yourtheme/layout/catalog.xml and enter the following code in the catalog/product_view block:

<block type="catalog/product_view_attributes" name="product.info.attributes" as="attributes" template="catalog/product/view/attributes.phtml"/>

Now open your product view page which is app/design/frontend/base/yourtheme/template/catalog/product/view.phtml. Add the following code to the part of the page where you want the table to appear:

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

On the site that I enabled this on, I duplicated the attributes.phtml page and renamed it attributes-view.phtml and simply linked to this from the XML file. This way you keep a backup of the old one in case you still need it. Keep reading the Magento Blog at E-commerce Website Design for more Magento tips and other ecommerce-related news.

  • Twitter
  • AIM
  • WordPress
  • LinkedIn
  • Facebook
  • StumbleUpon
  • Technorati Favorites
  • Delicious
  • Ping
  • Digg
  • Bebo
  • Reddit
  • MySpace
  • NewsVine
  • Google Bookmarks
  • Sphinn
  • Propeller
Categories: Magento Tags:

Post A Comment