View Single Post
  #1  
Old 10-23-2008, 07:07 AM
 
longhorn180 longhorn180 is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Richmond, Virginia
Posts: 187
 

Default Need some help with a new template I've created

I created a template called pimage.tpl that will call a product image based on the product's isbn (extra field) and here is the code for the template.
Code:
{section name=field loop=$extra_fields} {if $extra_fields[field].service_name eq "ISBN"} <img src="files/pimages/{$extra_fields[field].field_value}.jpg"> {/if} {/section}
I would like to use an if then function on the product page that would check the image folder in this template for an image and if it returned empty then the thumbnail.tpl would be called. I know I need to assign a variable to this template for the if then function to work but I'm not sure of the proper way to do this. Does anyone know how I might accomplish this?
__________________
4.1.9 (Linux) Live Store
www.thecrackedbook.com
Find used books and out of print books.
Reply With Quote