Upsell fails if Product Image filename contains single quote

Adding upsell items to a product.
Post Reply
norman
Site Admin
Posts: 1249
Joined: Sat Feb 07, 2004 9:55 pm

Upsell fails if Product Image filename contains single quote

Post by norman »

If your Product Image filenames contain a single quote, then older Upsells will fail to display that image anywhere. The fix is to edit Act_ProductImage.html and replace

Code: Select all

showimage('<IMG SRC="NETQUOTEVAR:IMAGEFILE" ALT="NETQUOTEVAR:ALTERNATETEXT" BORDER=0 NETQUOTEVAR:IMAGEHEIGHT NETQUOTEVAR:IMAGEWIDTH NETQUOTEVAR:OTHERIMAGEMARKUP>');
with

Code: Select all

showimage('<IMG SRC="' + "NETQUOTEVAR:IMAGEFILE" + '" ALT="NETQUOTEVAR:ALTERNATETEXT" BORDER=0 NETQUOTEVAR:IMAGEHEIGHT NETQUOTEVAR:IMAGEWIDTH NETQUOTEVAR:OTHERIMAGEMARKUP>');
The above should be pasted in as a single line.

Note that newer versions (January 2006) of Upsell don't have this problem.
Norman
Post Reply