Jump to content

Configurable Options Run Together


redham

Recommended Posts

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:

config_options.JPG

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

Link to comment
Share on other sites

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}

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated