Home Forums WoodMart support forum Dynamic Discounts – Wrong amounts in cart

Dynamic Discounts – Wrong amounts in cart

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #659770

    mcleanjd
    Participant

    Hello, having some trouble with the dynamic discounts. Some of the values in the checkout page don’t add up! Will provide some context and screenshots.

    Is it a rounding off issue?

    Attachments:
    You must be logged in to view attached files.
    #660001

    Luke Nielsen
    Keymaster

    Hello,

    May I disable the 3rd party plugins and enable the parent theme for testing?

    Looking forward to collaborating with you!

    Kind Regards

    #660038

    mcleanjd
    Participant

    You can go crazy on the dev.mcmerwe.co.za one not the live (mcmerwe.co.za)

    #660110

    Luke Nielsen
    Keymaster

    Hello,

    This is all happening because, in the WooCommerce settings, there’s an option to round numbers to whole numbers — just like in your case: https://monosnap.com/file/h8gUdB0e9MiIcDOQeJTBA5YSdUNNox. In your situation, 5% of 70 is 66.5, and if you multiply that by 19, you get 1263.5 — which rounds up to 1264. This calculation is done by WooCommerce itself.

    We replicated the exact same scenario with a default product (without Dynamic Discounts), applied a discount that results in a decimal: https://monosnap.com/file/9yOJdkJYAimKHq2AN0u5a7Jul3Qu0a — and as you can see, WooCommerce calculated it the same way: https://monosnap.com/file/GtWbFGfyhLOgeAlFllIXTn3tFbOFWU.

    Kind Regards

    #660143

    mcleanjd
    Participant

    Would I need to set “2” in the number of decimals for it to round up?

Viewing 5 posts - 1 through 5 (of 5 total)