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

Radio button help please

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-22-2004, 01:31 PM
 
Professor_Kan Professor_Kan is offline
 

Member
  
Join Date: Oct 2004
Posts: 21
 

Default Radio button help please

Cart v 3.4.x

I can't seem to get my radio button to select any values.

Here is my code

Code:
<td valign=middle height=25> {if $usertype eq "A"} { $product_options[product_option].optclass }: {else} { $product_options[product_option].opttext } {/if} </td> <td valign=middle> {if $cname ne ""} {assign var="poname" value="$cname[`$product_options[product_option].optclass`]"} {else} {assign var="poname" value="product_options[`$product_options[product_option].optclass`]"} {/if} {if $product_options[product_option].options ne ""} {assign var="options" value=$product_options[product_option].options} {section name=option loop=$options} <input type="radio" value="{ $product_options[product_option].opttext }" name="{$smarty.section.option.index}{if $options[option].select ne ""} checked{/if}"> {$options[option].option}{if $options[option].surcharge ne 0} ({$options[option].surcharge|value_sign:"1"} {if $options[option].type eq "absolute"}{$config.General.currency_symbol}{$options[option].surcharge|abs_value} {else}{$options[option].surcharge|abs_value}%{/if}){/if} </option> </select> {/section}

some help please?
__________________
168
Reply With Quote
  #2  
Old 11-22-2004, 03:58 PM
 
Professor_Kan Professor_Kan is offline
 

Member
  
Join Date: Oct 2004
Posts: 21
 

Default

Hello,

I have changed the product options from the default drop down menu to a radio button menu. Now the values can't be passed to the shopping cart.


File: customer_options.tpl
Location: /html/skin1/modules/Product_Options



------------------------- original code ----------------------------

<select name="{$poname}"{if $disable} disabled{/if}>
{section name=option loop=$options}
<option value={$smarty.section.option.index}{if $options[option].selected ne ""} selected{/if}>{$options[option].option}{if $options[option].surcharge ne 0} ({$options[option].surcharge|value_sign:"1"}{if $options[option].type eq "absolute"}{$config.General.currency_symbol}{$opti ons[option].surcharge|abs_value}{else}{$options[option].surcharge|abs_value}%{/if}){/if}</option>
{/section}

------------------------- end original code ----------------------------




------------------------- radio button code ----------------------------
{section name=option loop=$options}

<input type="radio" value="{ $options[option].option }" name="{ $product_options[product_option].opttext }"
{if $options[option].selected ne "checked"} {/if} >

{$options[option].option}{if $options[option].surcharge ne 0} ({$options[option].surcharge|value_sign:"1"}
{if $options[option].type eq "absolute"}{$config.General.currency_symbol}{$opti ons[option].surcharge|abs_value}
{else}{$options[option].surcharge|abs_value}%{/if}){/if}
</option>


</select>
{/section}

------------------------- end radio button code ----------------------------
__________________
168
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 11:08 AM.

   

 
X-Cart forums © 2001-2020