Author |
Topic |
|
Al Gardner
VP-CART New User
Canada
53 Posts |
Posted - March 27 2007 : 20:32:57
|
Hi, I would like to be able to display a various amount of extra images on the product page. I modified the tmp_products.htm to add these image fields. My problem is that if the field is not defined. the broken link X is displayed.
Is there a way around this?
Thanks,
Al |
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - March 27 2007 : 20:50:31
|
you could use the $ trick in the tmp_products.htm template, eg:
$<br><img src="[extraimage1]"> $<br><img src="[extraimage2]"> $<br><img src="[extraimage3]">
see also: How can I avoid printing a product label when the corresponding field is blank? : http://www.bigyellowzone.com/support/issue_view.asp?ID=223&CATE=8
or, if you'd like to have any number of images, you could use our addon which uses a naming convention and which'll display the thumbs (if you want) for all the images that it finds which match the naming convention:
VP-ASP Image Zooming and Multiple Images: http://www.bigyellowzone.com/shopexd.asp?id=91
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
Al Gardner
VP-CART New User
Canada
53 Posts |
Posted - March 27 2007 : 21:53:37
|
Hi Simon,
I tried this, embedding the code into the html for the cells and it did not resolve the issue. Just added a $ in front of the X
This is the code in place. Am I doing something wrong, or does this not work with images?
Thanks, Al
<tr> <td width="50%" align="center"> $ <img src="[extraimage1]" border="0" /></td> <td width="50%" align="center"> $ <img src="[extraimage2]" border="0" /></td> </tr> <tr> <td width="50%" align="center"> $ <img src="[extraimage3]" border="0" /></td> <td width="50%" align="center"> $ <img src="[extraimage4]" border="0" /></td> </tr>
quote: Originally posted by devshb
you could use the $ trick in the tmp_products.htm template, eg:
$<br><img src="[extraimage1]"> $<br><img src="[extraimage2]"> $<br><img src="[extraimage3]">
|
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - March 27 2007 : 22:23:42
|
it should work with any field, including the images, but the correct html to put in the template would be:
<tr> <td width="50%" align="center"> $<img src="[extraimage1]" border="0"> </td> <td width="50%" align="center"> $<img src="[extraimage2]" border="0"> </td> </tr> <tr> <td width="50%" align="center"> $<img src="[extraimage3]" border="0"> </td> <td width="50%" align="center"> $<img src="[extraimage4]" border="0"> </td> </tr>
(ie the </td> bits should be on a separate physical line from the img src, otherwise the tags won't match)
make sure that the $ is the very first character on the physical line (ie no spaces before it on that line)
that assumes that the "x" relates to the fact that those columns have blank values in them; if they have image values in them but the images are physically missing on the server, then that'd be a different issue.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on March 27 2007 22:26:05 |
|
|
Al Gardner
VP-CART New User
Canada
53 Posts |
Posted - March 27 2007 : 22:36:23
|
quote: Originally posted by devshb
make sure that the $ is the very first character on the physical line (ie no spaces before it on that line)
Hi again Simon, The issue was that while the $ was the first character on the line, I had it indented to format the code. I moved it back and it works fine. Would be nice it we could use it and maintain the formatting, but at least it works.
Thanks a lot,
Al |
|
|
|
Topic |
|