Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Conditioning Additional Fields

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-24-2006, 02:04 PM
 
sharingsunshine sharingsunshine is offline
 

Senior Member
  
Join Date: Aug 2005
Location: Palmyra, VA
Posts: 149
 

Default Conditioning Additional Fields

Hello,

I have added an additional field that I want to show up only when a certain condition is met.

Please tell me where in this code I should insert the if statement it is a checkbox and how do I make it checked already?


{* $Id: register_additional_info.tpl,v 1.2 2004/05/06 11:22:31 max Exp $ *}
{if $section ne '' && $additional_fields ne '' && (($is_areas.A eq 'Y' && $section eq 'A') || $section ne 'A')}
{if $hide_header eq "" && $section eq 'A'}
<TR>
<TD height="20" colspan="3">{$lng.lbl_additional_information}<HR size="1" noshade></TD>
</TR>
{/if}
{foreach from=$additional_fields item=v}
{if $section eq $v.section && $v.avail eq 'Y'}
<TR>
<TD align="right">{$v.title|default:$v.field}</TD>
<TD>{if $v.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
{if $v.type eq 'T'}
<INPUT type="text" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}" size="32" value="{$v.value|escape}">
{elseif $v.type eq 'C'}
<INPUT type="checkbox" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}" value="Y"{if $v.value eq 'Y'} checked{/if}>
{elseif $v.type eq 'S'}
<SELECT name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}">
{foreach from=$v.variants item=o}
<OPTION value='{$o|escape}'{if $v.value eq $o} selected{/if}>{$o|escape}</OPTION>
{/foreach}
</SELECT>
{/if}
{if $reg_error ne "" and $v.value eq "" && $v.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}
{/foreach}
{/if}

Thanks in advance,

Randal
__________________
***********************
Visit Our Other Web Sites!
∙ Nutritional Herbs and Supplements
<a href="http://www.theherbsplace.com"> The Herbs Place </a>
∙ Frugal Ideas and a Forum To Submit Your Questions
<a href="http://www.thefrugallife.com"> The Frugal Life </a>
∙ Healthy and Natural Pet Products
<a href="http://www.healthypetcorner.com"> Healthy Pet Corner </a>
***********************

Joined 08/02/05
X-Cart Gold Version 4.3.2
Linux RedHat Enterprise
Reply With Quote
  #2  
Old 06-24-2006, 02:11 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Moving to template editing
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-24-2006, 06:42 PM
 
sharingsunshine sharingsunshine is offline
 

Senior Member
  
Join Date: Aug 2005
Location: Palmyra, VA
Posts: 149
 

Default

Doesn't anyone happen to know how to do this?
__________________
***********************
Visit Our Other Web Sites!
∙ Nutritional Herbs and Supplements
<a href="http://www.theherbsplace.com"> The Herbs Place </a>
∙ Frugal Ideas and a Forum To Submit Your Questions
<a href="http://www.thefrugallife.com"> The Frugal Life </a>
∙ Healthy and Natural Pet Products
<a href="http://www.healthypetcorner.com"> Healthy Pet Corner </a>
***********************

Joined 08/02/05
X-Cart Gold Version 4.3.2
Linux RedHat Enterprise
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:12 PM.

   

 
X-Cart forums © 2001-2020