[SOLVED] Add thumbnail pic for Products Summary display

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

[SOLVED] Add thumbnail pic for Products Summary display

Post by CapereSpiritum »

Can anyone point me the way to get Products, summary template to display a thumbnail of the product.

Kinda want it to show before Product name.

Anyone done this before?

Thanks
Simon
Last edited by CapereSpiritum on Thu Feb 06, 2014 2:19 pm, edited 1 time in total.
otsakir
Forum Members
Forum Members
Posts: 17
Joined: Wed Mar 07, 2012 4:26 pm

Re: Add thumbnail pic for Products Summary display

Post by otsakir »

Add an image field in the field definition of your products and then use CGSmartImage module to display it as thumbnail.

For instance, if your field is named thumb_image, your product summary template may look like this:

Code: Select all

...
{assign var="image_path" value="uploads/Products/product_"|cat:$product_item->id|cat:"/"|cat:$product_item->fields.thumb_image->value}
<img src="{CGSmartImage src=$image_path filter_resize=w,60 notag=1 noembed=1}" />

I have hardcoded the path to the image file with in a long concatenation. There will probably be better ways
of getting the path to the product images directory
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: Add thumbnail pic for Products Summary display

Post by delve2013 »

This was helpful.. how would I display a field definition called "colour" in the detail template?
Post Reply

Return to “Modules/Add-Ons”