Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Adding attribute to top section of product display (just below product name) [SOLVED]
 
Bonaventure
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2007-09-26
 

Is it possible to add an attribute such as “author” to display immediately following the “title” or “name” of the product? That is, I want it to appear above “price’ and “review” attributes, like the products one might find on Amazon.

I have 100,000 products, so I don’t want to use the “dropdown” or “multiple select” items (which seem to be the only way to position items in the first section of the product display).

Am I missing something?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bonaventure
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2007-09-26
 

This can’t be that difficult. I’ve been searching through the app/design/frontend/default folders as well as the template xml files in search of the controller for the components that appear in the short display (small image, name, price, short description, etc.).

The most I could find is in the wiki http://www.magentocommerce.com/wiki/how-to/add-attributes-to-product-grid, but this didn’t work. Did something change with the release of the stable version? Please help.

After playing around, I realized that the tutorial from the wiki works. I was adding my code to the wrong section of view.phtml. I also needed to include a “class.” I borrowed the “short-description” class because I don’t know where to find a list of classes (or where to create a new one).
Anyway, I added the attribute “contributor_1” with the following code. It appears just below the name of the product.

<div class="product-shop">
            <
h3 class="product-name"><?php echo $this->htmlEscape($_product->getName()) ?></h3>
            <
h4 class="short-description"><?php echo $_product->getcontributor_1()?></h4>

I would be grateful if someone could tell me how to create a different class.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top