1999 Posts in 530 Topics by 433 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1478 Views |
-
Sorry, no product image for "XYZ" - grey background

3 November 2009 at 12:48am
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!
-
Re: Sorry, no product image for "XYZ" - grey background

3 November 2009 at 10:27am
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 "%s""),$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!
-
Re: Sorry, no product image for "XYZ" - grey background

4 November 2009 at 5:18am
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. -
Re: Sorry, no product image for "XYZ" - grey background

5 November 2009 at 7:56pm
Would that remove all images or adjust the ones that aren't there?
-
Re: Sorry, no product image for "XYZ" - grey background

5 November 2009 at 8:07pm
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 "%s""),$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 "%s""),$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 -
Re: Sorry, no product image for "XYZ" - grey background

5 November 2009 at 11:20pm
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.
| 1478 Views | ||
|
Page:
1
|
Go to Top |

