View Single Post
  #4  
Old 09-19-2006, 07:19 AM
 
burtsTechie burtsTechie is offline
 

Member
  
Join Date: Sep 2006
Posts: 20
 

Default Re: Not diplaying extra fields in certain instances

Alan- not sure if you got this figured out, but here's my solution to the same issue:

Code:
{* $Id: product.tpl,v 1.9 2005/11/21 12:42:06 max Exp $ *} {section name=field loop=$extra_fields} {if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value} {if $firstPass ne 1} <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"> <b><font class="ProductDetailsTitle">details</font></b> </td> </tr> <tr> <td class="Line" height="1" colspan="2"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td> </tr> <tr><td colspan="2">&nbsp;</td></tr> {assign var="firstPass" value="1"} {/if} <tr> <td width="30%">{$extra_fields[field].field}</td> {include file="milk_type_thumbnail.tpl"} </tr> {/if} {/section} {if $firstPass eq 1} </table> <p /> {/if}

I wanted the extra fields to be in their own table in the main product.tpl page, but didn't want that table to show up if no extra fields were present. This 'product.tpl' page is in the modules/extra_fields folder!
__________________
X-Cart Version: 4.15 (in development)
Reply With Quote