Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » [Solved] Product images

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

Page: 1
Go to End
Author Topic: 1099 Views
  • cumquat
    Avatar
    Community Member
    195 Posts

    [Solved] Product images Link to this post

    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

  • stooni
    Avatar
    Community Member
    89 Posts

    Re: [Solved] Product images Link to this post

    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

  • cumquat
    Avatar
    Community Member
    195 Posts

    Re: [Solved] Product images Link to this post

    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

  • phuell
    Avatar
    Community Member
    3 Posts

    Re: [Solved] Product images Link to this post

    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

  • cumquat
    Avatar
    Community Member
    195 Posts

    Re: [Solved] Product images Link to this post

    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

    1099 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.