Jump to content

Show prices in monthly format?


dalex

Recommended Posts

In the product section, all services are billed annually but I want to display it like this:

 

Example Product: $3,599.88 annually

How it displays on the front end: $299.99mo

 

 

In the product addons section, all services are billed annually but I want to display it like this:

 

Example Product Addon: $599.88 annually

How it displays on the front end: $49.99mo

 

Thanks!

Edited by dalex
Link to comment
Share on other sites

It is showing in monthly format now but not for the addon products, it is still showing the annual rate for addon products.

then the quick way is not enough. :roll:

 

you'll need to either edit configureproduct.tpl or write a hook to do some maths on the addons pricing array... basically, you'll strip the currency from the price, divide the amount by the appropriate number (e.g 12), add the currency back and output the result...

 

KZ9XGc8.png

in configureproduct.tpl, you would change...

 

{$addon.pricing}

to..

{if $addon.billingCycles.annually.price}{$currency.prefix}{((($addon.billingCycles.annually.price->toNumeric())/12)|number_format:2)}{$currency.suffix} mo{else}{$addon.pricing}{/if}

if the addon price is annual, it divides it by 12 to show the monthly price... if it's any other cycle, it just outputs as normal...

 

tSWzeG9.png

 

you could expand it to cover all billingcycle options, but the above should be sufficient for your needs. :idea:

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