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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

[Solved] Product images


Go to End


5 Posts   1522 Views

Avatar
cumquat

Community Member, 201 Posts

12 December 2009 at 12:49am

Edited: 17/12/2009 11:12am

Ok this is driving me a bit mental and it's possible I've been looking at it too long to see the answer anymore, and it seems so simple.

When a product is listed if the product image isn't the same dimensions as the display box it places a white surround to it. Ok sounds simple enough to sort just change the CSS.

Hmmm i have been all through the CSS and added my own but the images still get a white background.

When i use the same images in image_gallery they are displayed fine no surround unless i specify it so my question is where the hell is the eccomerce module getting the idea of putting a white surround on the images i can't see it in any of the CSS.

if your unsure what i mean heres the site http://gallery90.myriad-services.co.uk/online-store/

hope you can help put me out of my misery.

Mick

Avatar
stooni

Community Member, 89 Posts

12 December 2009 at 5:02am

Hello cumquat,

you have also checking the ProductGroup.css, i think you must change these parameters for another color!

.product_summary li.productItem

background:#f4f8f9;//default
border: 1px solid #c9e5f7;//default

----- Stooni

Avatar
cumquat

Community Member, 201 Posts

12 December 2009 at 6:06am

Cheers for the response,

i have been through all the style sheets, i'm not sure it's held there. I have set a background colour and you can see that when it loads but then the image just sits on top of it. I'm wondering whether it's a code thing to make the image up to a certain size and if it's not say 100px by 80px make it that size with a white background.

Does that make sense?

Like i said this has been driving me made for three days now.

Mick

Avatar
phuell

Community Member, 3 Posts

14 December 2009 at 11:06pm

i think this is a problem of the paddedResize as the (white) background is part of the image itself.

I have not tested it and it is entirely possible that I'm wrong but I think you have two options.

1.
You can specify another background color in product.php on line 313 like

return $gd->paddedResize(140,100,000000);

2.
You can change that line to do a resizeByWidth instead of a paddedResize

Avatar
cumquat

Community Member, 201 Posts

14 December 2009 at 11:28pm

You were right on the money.

I was sure it was gonna be something along those lines but not being much of a php guy couldn't find the code.

Many thanks for that.

Mick