Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Sorry, no product image for "XYZ" - grey background

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: 1642 Views
  • growin
    Avatar
    Community Member
    41 Posts

    Sorry, no product image for "XYZ" - grey background Link to this post

    I've just installed the ecommerce module and added a few hundred products but am having some difficulty with an odd grey background behind "Sorry, no product image for "xyz" and behind product images. I have no clue where to look to change this. It'd almost be better to remove this all together if I could. I'm using the standard theme Black Candy. Anyone point me in the right direction to the documentation for the ecommerce module? Here's an example of what I mean: http://www.tscnursery.com/broadleaved-evergreens/ I also had a few products that belong to more than one ProductGroup but when it gets added to the other group, it is completely out of alpha order. Any way to keep things in alpha-order? Any other suggestion/comments are welcome. Thanks!

  • growin
    Avatar
    Community Member
    41 Posts

    Re: Sorry, no product image for "XYZ" - grey background Link to this post

    Ok, I was able to find out where this comes from in the ProductGroupItem.ss with this statement: <img src="ecommerce/images/productPlaceHolderThumbnail.gif" alt="<% sprintf(_t("NOIMAGE","Sorry, no product image for &quot;%s&quot;"),$Title) %>" /></a>

    So how do I change this so that there is no reference to an image, no little grey box as if an image should be there, etc? I've been trying all kinds of changes but none make it vanish.

    Thanks!

  • rbquirke
    Avatar
    Community Member
    70 Posts

    Re: Sorry, no product image for "XYZ" - grey background Link to this post

    Well you could remove the img tag
    The related css styling will be in the ecommerce/css/ folder. Should be called ProductGroup.css I think.

  • growin
    Avatar
    Community Member
    41 Posts

    Re: Sorry, no product image for "XYZ" - grey background Link to this post

    Would that remove all images or adjust the ones that aren't there?

  • rbquirke
    Avatar
    Community Member
    70 Posts

    Re: Sorry, no product image for "XYZ" - grey background Link to this post

    ok, I assume that you don't understand how the template code works?
    No problem

    <% if Image %>
          <a href="$Link" title="<% sprintf(_t("READMORE","Click here to read more on &quot;%s&quot;"),$Title) %>"><img src="$Image.Thumbnail.URL" alt="<% sprintf(_t("IMAGE","%s image"),$Title) %>" /></a>
       <% else %>
          <a href="$Link" title="<% sprintf(_t("READMORE"),$Title) %>"><img src="ecommerce/images/productPlaceHolderThumbnail.gif" alt="<% sprintf(_t("NOIMAGE","Sorry, no product image for &quot;%s&quot;"),$Title) %>" /></a>
       <% end_if %>

    if you see the part where it says "if Image", that checks to see if the product has an image, and if so, runs the next line. Leave that bit alone.

    then there is the "else" line, so if it doesn't have an image, it runs the next line with the productPlaceHolderThumbnail.gif etc.
    Removing this line would therefore only affect products with no images.

    Make sense?

    A detailed explanation of how templates work can be found here: http://doc.silverstripe.org/doku.php?id=templates
    You might find some useful info to help you in other places

  • growin
    Avatar
    Community Member
    41 Posts

    Re: Sorry, no product image for "XYZ" - grey background Link to this post

    Well that did it. Thank You!!!!! I'm not sure why I didn't see those lines above the ones I mentioned. Thank you for pointing that all out. The ecommerce appearance looks so much better. http://www.tscnursery.com/ferns/ (no messy coding showing where there isn't an image) I kinda have an understanding of the templates and code but SS is new. Only had experience with oscommerce.

    1642 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.