View Single Post
  #5  
Old 11-03-2008, 11:38 PM
  SamsonWebDesign's Avatar 
SamsonWebDesign SamsonWebDesign is offline
 

Senior Member
  
Join Date: Oct 2008
Location: East Sussex, UK
Posts: 101
 

Default Re: Display an extra field on products.tpl

Quote:
Originally Posted by longhorn180
Here is the code to show an extra field on products.tpl in 4.1.xx. You just have to put the name of the extra field that you want to display in place of nameofextrafield.
Code:
{if $products[product].extra_fields ne ''} {foreach from=$products[product].extra_fields item=extra_field} {if $extra_field.service_name eq "nameofextrafield"} {if $extra_field.value ne ""} {$extra_field.value} {/if} {/if} {/foreach} {/if}

Hi,

I am having difficulty getting an extra field to show on the product.tpl page not the products.tpl.

I have created an extra field called CONTENTS which will display the contents of a book if there are any in the field.
I've tried this code but it doesn't work.

Any ideas??
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end!

Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk
Reply With Quote