Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

How to add a product image thumbnail to SwipeStripe product categories?


Reply


4 Posts   721 Views

Avatar
AdamDimech

Community Member, 4 Posts

23 February 2014 at 5:18pm

Edited: 23/02/2014 5:19pm

I have installed SwipeStripe, SwipeStripe Category, SilverStripe Gallery and SwipeStripe Gallery. What I want to do is add an image beside the description of each product in my shop on the category pages.

At present, my categories page will list each product as a hyperlink with its corresponding price. There are no images.

How do I get category pages to include product images? ([url=http://swipestripe.com/assets/Uploads/Screen-shot-2013-01-07-at-6.52.31-PM2.png]Example[/url])

For each product, I can select an image via the Gallery tab and even display a range of images on each product page (ie a thumbnail is generated). What I can't do is take that thumbnail and add it to:

/swipestripe-gallery/templates/Includes/Products.ss

Any help would be most appreciated.

Avatar
frankmullenger

Forum Moderator, 53 Posts

26 February 2014 at 9:00am

Hi Adam,

You probably want to do something like:

<% loop Products %>
$Images.First.SetWidth(200)
<% end_loop %>

Basically, Gallery_PageExtension is applied to the Product class which adds a many_many relation for Images. Hope that helps :-)

Avatar
AdamDimech

Community Member, 4 Posts

3 March 2014 at 1:03am

Thank-you so very much - that was a tremendous help.

I have written this up on my blog so that others can also benefit. The URL is [url]http://code.adonline.id.au/swipestripe-category/[/url]

Avatar
frankmullenger

Forum Moderator, 53 Posts

3 March 2014 at 8:39am

Cheers Adam, glad that it's sorted out. Thanks for writing up a blog post!