View Single Post
  #57  
Old 08-03-2006, 07:32 AM
 
longhorn180 longhorn180 is offline
 

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

Default

In the thread for the rc2 version of 4.1 svowl posted this code to display all extra fields in the products.tpl:
Code:
{if $products[product].extra_fields ne ''} {foreach $products[product].extra_fields item=extra_field} {$extra_field.field}: {$extra_field.value} {/forach} {/if}

and this code to display a single extra field:

Code:
{if $products[product].extra_fields ne ''} {foreach $products[product].extra_fields item=extra_field} {if $extra_field.service_name eq "ISBN"} {$extra_field.field}: {$extra_field.value} {/if} {/forach} {/if}


Unfortunately, I can't seem to get either of them to work. When I put the code into my products.tpl I get this error:
Code:
Fatal error: Smarty error: [in customer/main/products.tpl line 41]: syntax error: invalid attribute name: '$products[product].extra_fields' (Smarty_Compiler.class.php, line 1533)

Has anyone else had this problem? If so do you mind sharing how you fixed it.
__________________
4.1.9 (Linux) Live Store
www.thecrackedbook.com
Find used books and out of print books.
Reply With Quote