Jump to content
janice171

How do i get the annual cost to display? (only monthly displays!)

Recommended Posts

Hi,

 

I'm working my way through WHMCS but one thing i'm stuck on is that I am unable to get the Annual cost display on the front-end, only the monthly cost displays.

Is there a checkbox i'm missing?

 

Thanks

 

J

Share this post


Link to post
Share on other sites

this could be a couple of things depending upon where you're seeing the monthly price.

 

one checkbox you may want to look at is...

 

Setup -> General Settings -> Ordering Tab -> untick "Monthly Pricing Breakdown"

  • Like 1

Share this post


Link to post
Share on other sites

you need to do a template edit to display the yearly price

 

{if $product.bid}
{if $product.displayprice}<span class="pricing">{$product.displayprice}</span><br />{/if}
{$LANG.bundledeal}
{else}
{if $product.pricing.hasconfigoptions}{$LANG.startingfrom}<br />{/if}
<span class="pricing">{$product.pricing.minprice.price}</span><br />
{if $product.pricing.minprice.cycle eq "monthly"}
{$LANG.orderpaymenttermmonthly}
{elseif $product.pricing.minprice.cycle eq "quarterly"}
{$LANG.orderpaymenttermquarterly}
{elseif $product.pricing.minprice.cycle eq "semiannually"}
{$LANG.orderpaymenttermsemiannually}
{elseif $product.pricing.minprice.cycle eq "annually"}
{$LANG.orderpaymenttermannually}
{elseif $product.pricing.minprice.cycle eq "biennially"}
{$LANG.orderpaymenttermbiennially}
{elseif $product.pricing.minprice.cycle eq "triennially"}
{$LANG.orderpaymenttermtriennially}
{/if}
{/if}

 

the above code is taken from the slider template

you can change the elseif to if so you get the following code

{if $product.bid}
{if $product.displayprice}<span class="pricing">{$product.displayprice}</span><br />{/if}
{$LANG.bundledeal}
{else}
{if $product.pricing.hasconfigoptions}{$LANG.startingfrom}<br />{/if}
<span class="pricing">{$product.pricing.minprice.price}</span><br />
{if $product.pricing.minprice.cycle eq "monthly"}
{$LANG.orderpaymenttermmonthly}
{/if}
{if $product.pricing.minprice.cycle eq "quarterly"}
{$LANG.orderpaymenttermquarterly}
{/if}
{if $product.pricing.minprice.cycle eq "semiannually"}
{$LANG.orderpaymenttermsemiannually}
{/if}
{if $product.pricing.minprice.cycle eq "annually"}
{$LANG.orderpaymenttermannually}
{/if}
{if $product.pricing.minprice.cycle eq "biennially"}
{$LANG.orderpaymenttermbiennially}
{/if}
{if $product.pricing.minprice.cycle eq "triennially"}
{$LANG.orderpaymenttermtriennially}
{/if}
{/if}

 

Greetings From PowerChaos

Share this post


Link to post
Share on other sites

you are correct that editing the template would be the next step, but I think that your code is incorrect.

 

if you have a product that has two prices - monthly and annually - then $product.pricing.minprice.cycle is always going to be monthly, and so will always display the monthly price.

 

i've posted the fix to do this in another order form previously, but I can't find the post. I intentionally didn't post any code in the last reply as we don't know which order form they are using.

 

e.g, if they were using "comparison", then the fix is one line of code - in products.tpl @ line 56, you would replace...

 

{$product.pricing.monthly}

with

 

{$product.pricing.annually}

and then the comparison table would always show the annual price.

Share this post


Link to post
Share on other sites
you are correct that editing the template would be the next step, but I think that your code is incorrect.

 

if you have a product that has two prices - monthly and annually - then $product.pricing.minprice.cycle is always going to be monthly, and so will always display the monthly price.

 

i've posted the fix to do this in another order form previously, but I can't find the post. I intentionally didn't post any code in the last reply as we don't know which order form they are using.

 

e.g, if they were using "comparison", then the fix is one line of code - in products.tpl @ line 56, you would replace...

 

 

with

 

 

and then the comparison table would always show the annual price.

 

 

Thank you so much, this is indeed what i was looking for. I just added the extra {$product.pricing.annually} so i can display both the monthly and annual prices.

Now what's the best way to do this...should i copy the ..templates/orderforms/comparison directory so that i don't overwrite the default files?

Share this post


Link to post
Share on other sites
Now what's the best way to do this...should i copy the ..templates/orderforms/comparison directory so that i don't overwrite the default files?

yes - copy, rename and reupload... or just rename it to something else and select it in the ordering and/or product pages of setup.

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