• Hi there,
    I have a problem with rounding in the subtotal.
    As an example
    1 product costs € 181.54, so round it up to € 182.
    3 products then actually cost 3x € 181.54 = € 544.62, this round up to € 545.

    But because 1 product is rounded to € 182, 3 products should actually cost € 546,- and not € 545, –

    How can I solve this?

    • This topic was modified 4 years, 4 months ago by thomasv85.
    • This topic was modified 4 years, 4 months ago by thomasv85.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Missy a11n

    (@m155y5)

    Automattic Happiness Engineer

    Hi @thomasv85

    You can edit the decimals via WooCommerce > Settings > General (tab) > Currency Options (bottom of the page)

    It looks like this: https://d.pr/i/Xf2RsI

    Thread Starter thomasv85

    (@thomasv85)

    yes i already did that.
    It stands on 0.
    But in the cart he still calculate with 2 decimals and then you get the bug that i explained above.

    Plugin Contributor Niels Lange

    (@nielslange)

    Hello @thomasv85,

    Based on your message it seems that you see € 545,– in your cart and checkout page. That’d be expected behaviour as

    3 x € 181,54 = € 544,62 → € 545,00

    You mentioned

    > But because 1 product is rounded to € 182, 3 products should actually cost € 546,- and not € 545, –

    It seems that you expect the single items to be rounded before the total price is calculated. This is not the fact. The WooCommerce software simply calculates the total price not the individual, prices to avoid a wrong total price.

    Thread Starter thomasv85

    (@thomasv85)

    Niels,
    Can we change this in the function.php
    On some products we just have a few euro marge.
    With this difference sometimes we have to deliver the product with lost.

    Thread Starter thomasv85

    (@thomasv85)

    is there a solution for this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Calculate with rounded numbers’ is closed to new replies.