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
[SOLVED] Add thumbnail pic for Products Summary display
-
- Forum Members
- Posts: 223
- Joined: Wed Dec 28, 2011 12:11 pm
[SOLVED] Add thumbnail pic for Products Summary display
Last edited by CapereSpiritum on Thu Feb 06, 2014 2:19 pm, edited 1 time in total.
Re: Add thumbnail pic for Products Summary display
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:
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
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
Re: Add thumbnail pic for Products Summary display
This was helpful.. how would I display a field definition called "colour" in the detail template?