Jump to content

Editing the configurable options on the order page?? help!


Recommended Posts

I am trying to get the configurable options working for my dedicated server packages. However, I can't create multiple "Yes/No" Options under one configurable option? and i don't want multiple configurable options. The drop down and radio shows all the options but how can i make the "yes/no" show all the options as well?

 

Also, how can i create an extra

<BR>

or space between the different configurable option names? i think i found the right file, configureproduct.tpl and this is the code i think i need to edit, but where do i put the

<BR>

 

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

</td></tr>

{/foreach}

</table>

Link to comment
Share on other sites

Ok, nevermind, i played around with it for a few hours and found a simple solution if you don't need to use the radio button, here is the updated code snippet:

 

<table cellspacing="0" cellpadding="10">
     {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="checkbox" 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}
         {foreach key=num2 item=options from=$configoption.options}
         <input type="checkbox" name="configoption[{$configoption.id}]" value="1"{if $configoption.selectedqty} checked{/if}>
         {$configoption.options.0.name}
         {/foreach}{elseif $configoption.optiontype eq 4}
         <input type="text" name="configoption[{$configoption.id}]" value="{$configoption.selectedqty}" size="5">
         x {$configoption.options.0.name}{/if}</td>
     </tr>
     {/foreach}
   </table>

 

basically cellpadding was changed to from 0 to 10 and the input type for eq 2 was changed from radio to checkbox. This will create spacing between the services and you will need to input all your options and select radio in the admin section, but it will show up as checkbox on the order page and i tested that multiple selections do work :) hope it helps someone in the future

Link to comment
Share on other sites

  • 3 years later...

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