• Resolved dabeecher

    (@dabeecher)


    Hello,

    I have a product that has a price of £13.956, on the product page this gets rounded up to show as £13.96.

    When at basket stage the subtotal price is calculated using the £13.956 instead of the £13.96. Is there a way to change this?

    For example if you order 16x the subtotal shows as £223.30, when in fact the customer see’s they should be paying £13.96 so subtotal should be £223.36

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @dabeecher,

    Thanks for reaching out on this!

    As far as I know, there is no way to change this without customizing the fundamental rounding behavior of WooCommerce. By default, WooCommerce will use the product price you give it for calculation, and then round that total for display.

    16 x 13.956 = 223.296 is rounded to $223.30 – this gives the customer the most accurate display for what they are actually going to be paying.

    Could you give us a bit more information about your use case? Is there some reason that you are entering your price with three decimals when you are only wanting customers to pay and be charged in two decimals?

    If not, the easiest thing would be to assign product prices as you want the customer to actually pay them, without the extra fraction of a decimal.

    We look forward to hearing back from you on this!

    Thread Starter dabeecher

    (@dabeecher)

    Hi Jess,

    Thanks for the response above.

    The reason the price is set as 13.956 is because the cost price is 15.17 and then a customer received an 8% discount which then made the price 13.956 – but showed as 13.96 on the product page.

    So when that scenario happens, the subtotal looks incorrect at checkout (I fully understand the maths and get why its wrong) it obviously just looks abit weird

    Hi @dabeecher,

    Thanks so much for getting back to us on this! That makes sense – it’s not the set product price that’s doing it, it’s the discount. I’m afraid there’s no way to address this with default WooCommerce functionality. It will require customization.

    I’ve heard some reports of this behavior in cases where some kind of role- or condition-based discount plugin is applying the discount at the product level rather than at the cart or subtotal level.

    If that’s the case here, I’d definitely recommend reaching out to the developers of that discount plugin and showing them this display issue. This may be something they’d want to adjust in their code as far as how these discounts are calculated and displayed on their end.

    I also did some research on this and found this custom code discussion on the same issue. That code might be a good place for you to start with a customization to address this!

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not heard back from you in a while so I’ll go ahead and mark this thread as resolved. Hopefully, you were able to find a way forward with the issue.

    Please feel free to create a new thread if you have further questions.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Incorrect Subtotal’ is closed to new replies.