View Single Post
  #87  
Old 09-13-2006, 12:50 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: X-Cart 4.1.2 released

Quote:
Originally Posted by longhorn180
Okay, call me stupid. I cannot seem to get this to work on the products.tpl. Do you mind helping me see where I'm screwing this up? The extra field value won't display with this code
Code:
{section name=field loop=$products[product].extra_fields} {if $products[product].extra_fields[field].service_name eq "AUTHOR"} by: {$products[product].extra_fields[field].field_value} {/if} {/section}
Any help is greatly appreciated.
Try this:
PHP Code:
{if $products[product].extra_fields ne ''}
{foreach 
from=$products[product].extra_fields item=extra_field}
{if 
$extra_field.service_name eq "AUTHOR"}
by: {$extra_field.value}
{/if}
{/foreach}
{/if} 
One thing that gets confusing is that in some places it is field_value and others it is value.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote