redham Posted January 24, 2009 Share Posted January 24, 2009 Hello, I have a couple of questions concerning Configurable Options I hope someone with experience can help me with. I am setting up WHMCS to query new dedicated server clients on provisioning options. After I added all of the options and brought up the order page I noticed that one option runs right into the next without a space or blank line. This makes it hard to tell where one option ends and the next begins. See this screen shot: How can I insert a blank line or something so that each option is easily distinguished from the next? The next problem that comes to mind is I need a way to conditionally require that certain options be mandatory depending on whether or not another option is selected. For instance. If a client selects Raid 1 a second hard drive would be necessary. This may be beyond the scope of WHMCS in which case I'll have to get it done in java script or something. Can someone tell me about the method you used and make suggestions. Thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
redham Posted January 24, 2009 Author Share Posted January 24, 2009 I found the example of the dedicated server order from at http://demo.whmcs.com/cart.php?a=add&pid=4 and am using the drop-down option so that solved the first problem. What is the best way to solve the problem of requiring certain options? Thanks 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 24, 2009 Share Posted January 24, 2009 From the pic you are using the cart template! Open orderforms/cart/configureproduct.tpl and find this section then add the part in bold to your template and save. {if $configurableoptions} <p class="cartsubheading">{$LANG.orderconfigpackage}</p> <p>{$LANG.cartconfigoptionsdesc}</p> <div class="cartbox"> <table cellspacing="0" cellpadding="0"> {foreach key=num item=configoption from=$configurableoptions} <tr><td>{$configoption.optionname}:</td><td width="5"></td><td> {if $configoption.optiontype eq 1} <select name="configoption[{$configoption.id}]"> {foreach key=num2 item=options from=$configoption.options} <option value="{$options.id}"{if $configoption.selectedvalue eq $options.id} selected="selected"{/if}>{$options.name}</option> {/foreach} </select> {elseif $configoption.optiontype eq 2} {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="checked"{/if}> {$options.name}<br /> {/foreach} {elseif $configoption.optiontype eq 3} <input type="checkbox" name="configoption[{$configoption.id}]" value="1"{if $configoption.selectedqty} checked{/if}> {$configoption.options.0.name} {elseif $configoption.optiontype eq 4} <input type="text" name="configoption[{$configoption.id}]" value="{$configoption.selectedqty}" size="5"> x {$configoption.options.0.name} {/if} [b]<br />[/b] </td></tr> {/foreach} </table> </div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
redham Posted January 24, 2009 Author Share Posted January 24, 2009 Hi Sparky, Thanks, I didn't have a clue where to edit that. I need to spend some time learning how to customise my WHMCS. Setting this up isn't nearly as bad as I thought it would be. It's coming along nicely now. Thanks again 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 24, 2009 Share Posted January 24, 2009 No problem... if you only want the space between the radio's change the <br /> in the same spot to {if $configoption.optiontype eq 2}<br />{/if} 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.