Jump to content
andersbirkenstam

billingcycle as radiobutton?

Recommended Posts

Posted (edited)

I presume you mean on the "upgrade" page in the client area?  If so, replacing the dropdown in the upgrade.tpl template with a radio button group with the same name but different value would do the job. 

EDIT: Or if you meant on shopping cart, then doing the same in configureproduct.tpl .

Edited by steven99

Share this post


Link to post
Share on other sites
Posted (edited)

hello,

thx steven for your time :)

yes is the shopping cart billingcycle i want to make radio buttons for in the SIX theme. i am not a coder just copy and paste any instructions for idiots?

i cant find configureproduct.tpl in six theme?

Warm regards B

Edited by andersbirkenstam

Share this post


Link to post
Share on other sites

hi guys,

successfully change the code to radio buttons :) i used this code from modern cart them 

 {if $pricing.monthly}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle1" value="monthly"{if $billingcycle eq "monthly"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle1" class="radio-inline">{$pricing.monthly}</label>
            </td>
        </tr>
    {/if}
    {if $pricing.quarterly}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle2" value="quarterly"{if $billingcycle eq "quarterly"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle2" class="radio-inline">{$pricing.quarterly}</label>
            </td>
        </tr>
    {/if}
    {if $pricing.semiannually}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle3" value="semiannually"{if $billingcycle eq "semiannually"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle3" class="radio-inline">{$pricing.semiannually}</label>
            </td>
        </tr>
    {/if}
    {if $pricing.annually}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle4" value="annually"{if $billingcycle eq "annually"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle4" class="radio-inline">{$pricing.annually}</label>
            </td>
        </tr>
    {/if}
    {if $pricing.biennially}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle5" value="biennially"{if $billingcycle eq "biennially"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle5" class="radio-inline">{$pricing.biennially}</label>
            </td>
        </tr>
    {/if}
    {if $pricing.triennially}
        <tr>
            <td class="radiofield">
                <input type="radio" name="billingcycle" id="cycle6" value="triennially"{if $billingcycle eq "triennially"} checked{/if} onclick="{if $configurableoptions}updateConfigurableOptions({$i}, this.value){else}recalctotals(){/if}" />
            </td>
            <td class="fieldarea">
                <label for="cycle6" class="radio-inline">{$pricing.triennially}</label>
            </td>
        </tr>
    {/if}

 

and just replaced it with the code in standard_cart, please see attached image but the price dont change when clicking a radio button? the price though change when i continue to  next page.

does any one have any idea how to make the price change when clicking on radio button?

warm regards Birken

 

 

2019-03-13_10-56-21.jpg

Share this post


Link to post
Share on other sites
5 hours ago, andersbirkenstam said:

does any one have any idea how to make the price change when clicking on radio button?

the code I posted in the thread below still works in v7.7.1 🙂

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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