stevenrca Posted August 22, 2008 Share Posted August 22, 2008 Hi Friends, Wanted to know if their is any way to display radio selection than checkbox in product addons tpl file [configureproduct.tpl]. Below is whats the exisitng code. {/if} {if $addons} {$LANG.cartaddons} {$LANG.orderaddondescription} {foreach key=num item=addon from=$addons} {$addon.checkbox} {$addon.name} - {$addon.description} {/foreach} {/if} {if $customfields} {$LANG.orderadditionalrequiredinfo} {$LANG.cartcustomfieldsdesc} 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted August 22, 2008 Share Posted August 22, 2008 If you used radio selection you would only be able to select 1 of your addons. That's why its a checkbox so your able to select multiple addons. 0 Quote Link to comment Share on other sites More sharing options...
stevenrca Posted August 22, 2008 Author Share Posted August 22, 2008 Hi Steve Bros, My intention is to allow only 1 addon in the selection. Thats why asked if any one can help me out. Following is the latest code - giving some error once selected - anyone can help me out here please. <table> {foreach key=num item=addon from=$addons} <tr> <td><input type="radio" name="addon.id" value="addons" id="addon.id" onclick="document.getElementById('addon').style.display='none'" /></td> <td><label for="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description} </label></td> </tr> {/foreach} </table> 0 Quote Link to comment Share on other sites More sharing options...
stevenrca Posted August 23, 2008 Author Share Posted August 23, 2008 hi, Was able to get few things done ... but still not able to pass the values to next page. The below display radio selection or the list. <table> {foreach key=num item=addon from=$addons} <tr> <td><input type="radio" name="radioaddon" value="addon" id="addon.id"/></td> <td><label for="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description} </label></td> </tr> {/foreach} </table> <select name="addon"> {foreach key=num item=addon from=$addons} <option value="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description}</option> {/foreach} </select> Apriciate if some one can help me out on this. 0 Quote Link to comment Share on other sites More sharing options...
normanvis Posted September 3, 2008 Share Posted September 3, 2008 Did you manage to find a solution to this problem..i have the same problem. 0 Quote Link to comment Share on other sites More sharing options...
stevebluck Posted September 4, 2008 Share Posted September 4, 2008 yeah, im also having the same problem - any help would be great 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted September 5, 2008 Share Posted September 5, 2008 Howdy, I got this working fine with no issues. {foreach key=num item=configoption from=$configurableoptions} <tr class="orderrow{if $num % 2}2{else}1{/if}"> <td>{$configoption.optionname}</td> <td> {foreach key=num2 item=options from=$configoption.options} <input type="radio" name="configoption[{$configoption.id}]" value="{$options.id}"{if $configoption.selectedvalue eq $options.id} checked{/if}>{$options.name} <br /> {/foreach} </td> </tr> {/foreach} Online Example: https://hq.solidnetdc.com/orders/order.php?step=2&pid=165&systemtemplate=portal FYI: I am running an older version of WHMCS and do not know if the same syntax is still used for newer versions. Thanks, Adam 0 Quote Link to comment Share on other sites More sharing options...
normanvis Posted September 5, 2008 Share Posted September 5, 2008 Can someone pls explain how to parse the value from the addons to the next page from a SELECT dropdown menu. <select name="addon"> {foreach key=num item=addon from=$addons} <option value="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description}</option> {/foreach} </select> 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted September 6, 2008 Share Posted September 6, 2008 Can someone pls explain how to parse the value from the addons to the next page from a SELECT dropdown menu. <select name="addon"> {foreach key=num item=addon from=$addons} <option value="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description}</option> {/foreach} </select> Howdy, Can you explain to us what you are trying to do? Create a dropdown box, or what? I do not understand what your question. Thanks, Adam 0 Quote Link to comment Share on other sites More sharing options...
normanvis Posted September 6, 2008 Share Posted September 6, 2008 Hey Adam.... goto the link below and add a product from the first group, and then select the addon, when you click continue, you'll see that the addon was not added to the shopping cart. Please make some sense out of this... http://www.connect-za.co.za/client/cart.php thanks Norman 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 6, 2008 Share Posted September 6, 2008 Can someone pls explain how to parse the value from the addons to the next page from a SELECT dropdown menu. <select name="addon"> {foreach key=num item=addon from=$addons} <option value="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description}</option> {/foreach} </select> Try this... not 100% sure but it should work <select name="addon" onchange="submit()"> {foreach key=num item=addon from=$addons} <option value="a{$addon.id}"><strong>{$addon.name}</strong> - {$addon.description}</option> {/foreach} </select> 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted September 6, 2008 Share Posted September 6, 2008 Hey, Are you sure that, a{$addon.id} is the correct value? Thanks, Adam 0 Quote Link to comment Share on other sites More sharing options...
normanvis Posted September 6, 2008 Share Posted September 6, 2008 not too sure, thats why i need your help.. 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted September 6, 2008 Share Posted September 6, 2008 not too sure, thats why i need your help.. I would recommend you hire WHMCS or one of the many companies that sell templates for WHMCS (MyWHMCS, MatchMySite, etc) to help you with this custom add-on. Thank you, Adam 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.