Round total price

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Round total price

Postby mojmir.jaros@.....com » Mon Jun 22, 2020 3:40 pm

Hello,
is it possible to round total order price to integers? I found rounding of product prices in virtuemart settings, but i didnt found rounding total neither virtuemart nor OPC.
Example: i have 2 products in cart, 1st one cost 22.29 and second one cost 10.29. Now total is 22.29 + 10.29 = 32,58, and i would like to round it to 33.
Thank you
Mojmír
mojmir.jaros@.....com
 
Posts: 1
Joined: Mon Oct 20, 2014 9:39 pm

Re: Round total price

Postby admin » Tue Aug 25, 2020 11:15 am

hello Mojmir, there are 2 configurations in Virtuemart which OPC uses:
- per currency config
- per type of price config

if you are using just a single currency, you can configure:
- per type of price config - all displayed prices to -1 so it follows the currency config
- configure the currency which you are using to use just integers

also make sure you configure "rounding per display" at VM backend checkout configuration as needed

and make sure you use a proper VAT calculation type since in EU the VAT is calculated from the b2c prices rounded while VM internally uses b2b non-VAT price normally.

in short - OPC only follows currency config per the currency being used, it doesn't alter the number of decimals.

if you are interested in rounding just the "total" price, let me know about this as it would need to be a feature request (what exactly would happen with taxes when you round just the order total price) ?

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x