Page 1 of 1

Round total price

PostPosted: Mon Jun 22, 2020 3:40 pm
by mojmir.jaros@.....com
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

Re: Round total price

PostPosted: Tue Aug 25, 2020 11:15 am
by admin
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