Jump to content

How can I change default Billing Cycle monthly to Annually?


TorabRamin

Recommended Posts

8 minutes ago, TorabRamin said:

When someone trying to order a new service the default billing cycle always set to monthly but I like to set this billing cycle annual instead fo monthly.

either add &billingcycle=annually to the end of your product links, or you could edit configureproducts.tpl and re-sort the {if} statements in the recurring billing block of code (the part that generates the dropdown list)

Link to comment
Share on other sites

9 minutes ago, brian! said:

either add &billingcycle=annually to the end of your product links, or you could edit configureproducts.tpl and re-sort the {if} statements in the recurring billing block of code (the part that generates the dropdown list)

How can I re-sort can you give me an example?
I'm using Lagom theme. Attached configureproducts.tpl

configureproduct.tpl

Link to comment
Share on other sites

ignore what I said about resorting them, it wouldn't make any difference - I forgot that WHMCS will default to choosing the smallest available cycle. 🙄

if you're going to do this in the template, you could just add the code below to the beginning of the template...

{assign billingcycle "annually"}

and that should default the product to choosing the annual option - if it's available or another cycle hasn't been chosen in the URL.

Link to comment
Share on other sites

5 minutes ago, brian! said:

ignore what I said about resorting them, it wouldn't make any difference - I forgot that WHMCS will default to choosing the smallest available cycle. 🙄

if you're going to do this in the template, you could just add the code below to the beginning of the template...


{assign billingcycle "annually"}

 and that should default the product to choosing the annual option - if it's available or another cycle hasn't been chosen in the URL.

Thank you it worked 😘

Link to comment
Share on other sites

7 hours ago, brian! said:

link?

just because a feature request has been submitted, it doesn't necessarily mean that it will get added to WHMCS.

woo....I believe I  found  that future requested as PLANED, but i can not find it  right now...but   I am    not sure if this information is 100% sure. 

Link to comment
Share on other sites

23 hours ago, zitu4life said:

Status says IN PROGRESS

then I doubt you'll see it until v8.

the sad thing is - if that FR had been a question here 4 years ago, it would have been easily answered (by me or others)... instead of gathering dust for 4+ years. 🙄

Link to comment
Share on other sites

  • 8 months later...

Hi @brian!,

Thank you so much for your help.

I added this to the tpl and it works fine.

On 19/12/2019 at 5:10 PM, brian! said:

ignore what I said about resorting them, it wouldn't make any difference - I forgot that WHMCS will default to choosing the smallest available cycle. 🙄

if you're going to do this in the template, you could just add the code below to the beginning of the template...


{assign billingcycle "annually"}

and that should default the product to choosing the annual option - if it's available or another cycle hasn't been chosen in the URL.

However, I noticed that when I append the billingcycle=monthly to my URL, it doesn't select the monthly cycle. How can I use this such that the appended billing cycle is selected?

Link to comment
Share on other sites

  • 7 months later...

Hi,

We have added {assign billingcycle "annually"}, which does indeed make sure 'annually' gets selected by default. We use configurable options with our hostingproducts, and even thought 'annually' is selected, the prices shown in the dropdown menu of the configurable options are not correct, the dropdown menus show the 'quaterly' prices. You can see this in the screenshot 10GB should show €15, not €3,75. Only when i click on 'annually' again it shows the correct prices.
Does anyone know a fix for this? Thanks!


 

Schermafbeelding 2021-05-17 100236.jpg

Link to comment
Share on other sites

6 hours ago, weba said:

Does anyone know a fix for this?

go back one step in the order process, e.g products.tpl and add &billingcycle=annually...

you probably won't need the smarty stuff, just adding the above will default all products to annual and config options should work from that value.

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.

×
×
  • 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