Jump to content

How change billing format


Recommended Posts

so instead of...

Quote

$4.77USD 1 Month Price

... you want... ?

Quote

1 Month Price - $4.77USD

do you have any hooks or other code tweaks running on the cart ? I ask because the way you want to display the text is the default way WHMCS does it...

ruP3RvC.png

... and so if your site isn't doing that, i'm wondering what is changing the format of the output?

Link to comment
Share on other sites

5 minutes ago, messir said:

Where I can check the code?

who wrote the currency converter ?

I had a look at the specific template on your site yesterday and it's not been altered - so it's not the template making this change... and if you say that there isn't a separate hook, then it must be an addon.

Link to comment
Share on other sites

3 hours ago, messir said:

it's the SSL Center addon - I can see the code in the hooks file that's changing the pricing format... you could try deactivating the addon to see if that removes the issue and confirms that to be the cause. (with it disabled, the cart should use the normal format).

3 hours ago, messir said:

And one more question. How first show 36 month price and not from One month?

that would require a template change to configureproduct.tpl - you would need to reverse the order of the six if statements ~ lines 62-91... and also assign the $billingcycle variable to the longest cycle with a price... that last bit you could do in the template or as a hook, but changing the order of the dropdown would need a template edit.

you could fix the layout issue in the template too if you had too - but it would be easier to know if disabling the addon would be an option first.

Link to comment
Share on other sites

On 5/15/2020 at 6:10 PM, brian! said:

it's the SSL Center addon - I can see the code in the hooks file that's changing the pricing format... you could try deactivating the addon to see if that removes the issue and confirms that to be the cause. (with it disabled, the cart should use the normal format).

I dsable the Addon. No changes!

So what to do?

Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, messir said:

Same.... No format change.

then you're going to need to add {debug} to the configureproduct.tpl template and post a screenshot of the $pricing array in the popup window it generates after you refresh the page.

2GNGUSL.png

if you're lucky, the pricing->cycles array should be different than the prices above it - if they're not, then this would be a pain to solve in the template.

btw - i'm 105% convinced that it's the SSL addon that's causing this, so it might be worth contacting GoGetSSL about this... if it is the addon, it might be fixable in their code as it isn't encrypted, but that would make updating it more difficult in the future.

Link to comment
Share on other sites

7 hours ago, brian! said:

then you're going to need to add {debug} to the configureproduct.tpl template and post a screenshot of the $pricing array in the popup window it generates after you refresh the page.

I enable in Admin panelDebug mode and error log. Refresh price page but it not popup....

What I do wrong?

Link to comment
Share on other sites

dammit - I was hoping the cycles array was going to be unmodified and so that could be used... 😠

in configureproduct.tpl, you could change...

                                    <select name="billingcycle" id="inputBillingcycle" class="form-control select-inline" onchange="{if $configurableoptions}updateConfigurableOptions({$i}, this.value);{else}recalctotals();{/if}">
                                        {if $pricing.monthly}
                                            <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}>
                                                {$pricing.monthly}
                                            </option>
                                        {/if}
                                        {if $pricing.quarterly}
                                            <option value="quarterly"{if $billingcycle eq "quarterly"} selected{/if}>
                                                {$pricing.quarterly}
                                            </option>
                                        {/if}
                                        {if $pricing.semiannually}
                                            <option value="semiannually"{if $billingcycle eq "semiannually"} selected{/if}>
                                                {$pricing.semiannually}
                                            </option>
                                        {/if}
                                        {if $pricing.annually}
                                            <option value="annually"{if $billingcycle eq "annually"} selected{/if}>
                                                {$pricing.annually}
                                            </option>
                                        {/if}
                                        {if $pricing.biennially}
                                            <option value="biennially"{if $billingcycle eq "biennially"} selected{/if}>
                                                {$pricing.biennially}
                                            </option>
                                        {/if}
                                        {if $pricing.triennially}
                                            <option value="triennially"{if $billingcycle eq "triennially"} selected{/if}>
                                                {$pricing.triennially}
                                            </option>
                                        {/if}
                                    </select>

to...

                                    <select name="billingcycle" id="inputBillingcycle" class="form-control select-inline" onchange="{if $configurableoptions}updateConfigurableOptions({$i}, this.value);{else}recalctotals();{/if}">
                                        {if $pricing.monthly}
                                            <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}>
                                                {$LANG.orderpaymentterm1month} - {$currency.prefix}{$pricing.rawpricing.monthly}{$currency.suffix}
                                            </option>
                                        {/if}
                                        {if $pricing.quarterly}
                                            <option value="quarterly"{if $billingcycle eq "quarterly"} selected{/if}>
                                                 {$LANG.orderpaymentterm3month} - {$currency.prefix}{$pricing.rawpricing.quarterly}{$currency.suffix}
                                            </option>
                                        {/if}
                                        {if $pricing.semiannually}
                                            <option value="semiannually"{if $billingcycle eq "semiannually"} selected{/if}>
                                                {$LANG.orderpaymentterm6month} - {$currency.prefix}{$pricing.rawpricing.semiannually}{$currency.suffix}
                                            </option>
                                        {/if}
                                        {if $pricing.annually}
                                            <option value="annually"{if $billingcycle eq "annually"} selected{/if}>
                                                {$LANG.orderpaymentterm12month} - {$currency.prefix}{$pricing.rawpricing.annually}{$currency.suffix}
                                            </option>
                                        {/if}
                                        {if $pricing.biennially}
                                            <option value="biennially"{if $billingcycle eq "biennially"} selected{/if}>
                                                 {$LANG.orderpaymentterm24month} - {$currency.prefix}{$pricing.rawpricing.biennially}{$currency.suffix}
                                            </option>
                                        {/if}
                                        {if $pricing.triennially}
                                            <option value="triennially"{if $billingcycle eq "triennially"} selected{/if}>
                                                {$LANG.orderpaymentterm36month} - {$currency.prefix}{$pricing.rawpricing.triennially}{$currency.suffix}
                                            </option>
                                        {/if}
                                    </select>

that should certainly give you the output that you originally wanted. 🙂

Link to comment
Share on other sites

  • 3 weeks 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