X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Radio button help please (https://forum.x-cart.com/showthread.php?t=10532)

Professor_Kan 11-22-2004 01:31 PM

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?

Professor_Kan 11-22-2004 03:58 PM

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 ----------------------------


All times are GMT -8. The time now is 04:51 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.