Jump to content

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


janice171

Recommended Posts

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

Link to comment
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.

Link to comment
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?

Link to comment
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.

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.

  • 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