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

How Do I Add Information Beneath Images on Product Page? 
 
luke.wyrsta
Jr. Member
 
Total Posts:  8
Joined:  2009-05-14
 

Hi All,

How Do I Add Information Beneath the feature image on the Product Page?

I simply want to add some titles and attributes in a list but cannot get it to align left beneath these component.

Your help is appreciated.

Luke

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

Hi Luke,

Can you illustrate what you want to do? I’m not sure I understand.

 
Magento Community Magento Community
Magento Community
Magento Community
 
luke.wyrsta
Jr. Member
 
Total Posts:  8
Joined:  2009-05-14
 

Hi jkragh,

I simply want to be able to reposition some of the attributes on the left had side.

For example, I have now added manufacturer image. I would like to add a title.... manufacturer, then beneath this show the image. I may then add a brief paragraph about the manufacturer below the image…

Thanks,
Luke

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

Hi Luke,

Are you aiming for something similar to the attached image, or do you want the information to appear immediately below the product image?

Jacob.

Image Attachments
attributes_below_image.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
luke.wyrsta
Jr. Member
 
Total Posts:  8
Joined:  2009-05-14
 

Hi Jacob,

That’s pretty much what i’m looking for.

I can easily output the info, but I can’t find a way to move it there....

http://gtpopping.com/magento/varivas-gt.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

Hi Luke,

To get the look I illustrated with the image above I changed the table in template/catalog/product/view/attributes.phtml in my theme to an unordered list, i.e., I replaced this bit,

<table cellspacing="0" class="data-table" id="product-attribute-specs-table">
    
<?php foreach ($_additional as $_data): ?>
    
<tr>
        <
td class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></td>
        <
td class="data"><?php echo $_helper->productAttribute($_product$_data['value']$_data['code']?></td>
    </
tr>
    
<?php endforeach; ?>
</table>

with this:

<ul>
    
<?php foreach ($_additional as $_data): ?>
        
<li><strong><?php echo $this->htmlEscape($this->__($_data['label'])) ?>:</strong><br />
        
<?php echo $_helper->productAttribute($_product$_data['value']$_data['code']?></li>
    
<?php endforeach; ?>
</ul>

Then I changed the manufacturer attribute into a Text Area attribute so that I could use HTML in the attribute value, and then I edited the product’s manufacturer attribute to read

<img src="http://www.localhost.com/media/catalog/product/m/a/manufacturer.gif" /><br />
Some Coffee Manufacturer is the oldest and finest coffee manufacturer on this side of the planet.

Hope that helps.

Jacob

 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

Hi - I also have a problem with attribute images & I was wondering if you can help.
I have set some images for a color attribute (multiple select) & they are ok in
layered navigation & additional information.
However, they are not showing up in the dropdown list in the advanced search page.
Any idea why this is happening?

Thanks (and sorry for butting in)

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

I don’t know how you set images for a multiple select attribute, so I’m probably the wrong person to ask. red face

Anyway, if I understand you correctly, the problem is that the only way you can display images within an option element (to my knowledge) is with CSS. So if you want coloured boxes to appear next to options in the dropdown list in the advanced search page, you have to apply a unique style rule to each of the options. I don’t think Magento supports that out of the box, so you’d need to modify some code to get it to work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

thanks for the reply
the images work ok for layered navigation & additional info
but not for the dropdown
I just put <img src="/shop/skin/frontend/default/MY-TEMPLATE/images01/XXX.gif"/>
into the value & it’s ok
Do you know how I can display the admin option instead of the value of the attribute?

Thanks a million, Jacob
grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 
liotropi - 20 June 2009 12:53 AM

I just put <img src="/shop/skin/frontend/default/MY-TEMPLATE/images01/XXX.gif"/>
into the value & it’s ok

Cool, I didn’t know you could do that. It doesn’t seem to work for me under “Additional Information”, but anyway… I think I figured out a way to display the icons in the advanced search dropdown. It’s not a pretty solution, but it works (in modern browsers). (See the attached image.)

What I suggest is that you match the options through their value attributes. Each option element within the select element (the “dropdown") has a unique value attribute:

<select id="colour" class="multiselect" size="4" multiple="multiple" title="Colour" name="colour[]">
    <
option value="7">Blue</option>
    <
option value="6">Green</option>
    <
option value="8">Red</option>
</
select>

We can match each attribute by using a CSS 2.1 selector: the following CSS rules would place a unique icon next to each option:

#colour option { padding-left: 20px; background: transparent no-repeat left center; }
#colour option[value="6"] { background-image: url(http://www.localhost.com/skin/frontend/default/default/images/icon_table.gif); }
#colour option[value="7"] { background-image: url(http://www.localhost.com/skin/frontend/default/default/images/icon_tag_green.gif); }
#colour option[value="8"] { background-image: url(http://www.localhost.com/skin/frontend/default/default/images/icon_basket.gif); }

You might place this CSS in a file such as skin/frontend/default/default/css/icons.css. You could then instruct Magento to load this extra file only on the advanced search page by modifying layout/catalogsearch.xml in your theme. You’d want to open the file, find the element called catalogsearch_advanced_index, and insert the following code as a child element of <reference name="head">:

<action method="addCss"><stylesheet>css/icons.css</stylesheet></action>

That would be one way of solving the problem, but probably not a very good one. A more robust method would involve modifying the advanced search template so that each option element would get a unique id or class. You could then avoid the attribute selector and instead use plain id or class selectors.

liotropi - 20 June 2009 12:53 AM

Do you know how I can display the admin option instead of the value of the attribute?

I don’t understand. Please elaborate.

Image Attachments
colour_icons.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

Wow - you are really helpful. Thank you. Anything I can do for you just let me know.

--- Do you know how I can display the admin option instead of the value of the attribute? ---

This is what I mean.
In the backend when you are at Edit Product Attribute - Manage Options (values of your attribute)
you can input various values for the attribute
- Admin
- site 1
- site 2 etc

In the Admin - I will write the color green
& in site 1 - I can keep the image.

Si I was thinking to change the value in the advanced search form from “site 1” to “Admin”
But I don’t know how to do it.

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

I forgot - it does work great for both layered nav & additional info (if enabled)
here are some images from my site

Image Attachments
002.JPG003.JPG
 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

Ah. Showing the “Admin” field precludes showing the “site 1” field and vice versa. You see, what you type into “site 1” will override what you type into the “Admin” field. Unless you leave “site 1” blank, the “Admin” field can’t be shown.

What I suggest you do is change what you have in the “site 1” field from

<img src="/shop/skin/frontend/default/MY-TEMPLATE/images01/XXX.gif"/>

to

<img src="/shop/skin/frontend/default/MY-TEMPLATE/images01/XXX.gif"/> Green

for instance.

That way, you should see “Green” as an option in the advanced search dropdown.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

I can’t do that because it’s not really one color but a color combination
& it will mess up my layered navigation.
There must be something I can change in the form.phtml of the advanced search
in order to get the Admin field instead of site 1 field.
I am not a programmer just learning alot of stuff while building my e-shop.
Anyway, thanks alot for your help. I owe you.

I found another way to do it. Create a new attribute (actually, copy the other one) &
show that only in the advanced search. It’s not the right way to do it but at least it will get
the job done.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jkragh
Sr. Member
 
Total Posts:  84
Joined:  2009-06-18
 

Yeah, I didn’t know you were using gradients. tongue laugh

I’m sure there is a way to make the advanced search page show the Admin field instead of the site 1 field, but I don’t know how to do it. It’s not something you can achieve through a simple change in form.phtml. My CSS solution would be an easier option, I think. If you want to pursue it some day and you’d like a more thorough how-to, let me know.

Anyway, glad I could help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jwpadgett
Member
 
Total Posts:  69
Joined:  2007-09-05
 

I am also looking for a way to get the admin value of an attribute option. I have color attributes on a configurable product, but need to get the admin attribute value rather than the store view value for a module I’m writing. Any help would be appreciated.

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