2088 Posts in 1007 Topics by 455 members
|Go to End|
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!
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.
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.
5 November 2009 at 7:56pm
Would that remove all images or adjust the ones that aren't there?
5 November 2009 at 8:07pm
ok, I assume that you don't understand how the template code works?
<% 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.
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
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.
|Go to Top|