1

I have a product priced at £10.82 which gets 20% VAT added to it, leaving the price to be £12.98

This works fine when 1 product is in the cart but when more than 1 (e.g. 7) are added the calculation works like this

£10.82 * 7 = £75.74 (no problem here) £75.74 * 1.2 = £90.888 (which is rounded to £90.89

When £12.98 * 7 = £90.86 (the correct amount). This is the figure I need to show not £90.89.

1
  • round($price,4) is also not working for me, what solution you applied for rounding issue?
    – Yogita
    May 17, 2018 at 18:01

2 Answers 2

2

Change Tax Calculation Method Based On to Unit Price instead of Total under System > Configuration > Tax > Calculation Setting.

This will give you the tax calculation you'd like based on (£10.82 + (£10.82 * 0.2)) = £12.98 (rounded) * 7 = £90.86 rather than £75.74 + (£75.74 * 0.2) = £90.89.

1
  • Thank you, this has fixed the problem
    – snez
    Dec 2, 2019 at 15:22
0

Try copying app/code/local/Mage/Core/Model/Store.php to app/code/core/Mage/Core/Model/Store.php and change:

public function roundPrice($price)
{
    return round($price, 2);
}

for:

public function roundPrice($price)
{
    return round($price, 4);
}
4
  • Thanks for your reply, I have tried this and it hasn't changed anything. Do you have any other suggestions?
    – lnelson92
    Sep 26, 2016 at 22:04
  • have you cleared cache after change this? Sep 26, 2016 at 22:05
  • Cache is disabled, I've just flushed it to double check and its still the incorrect total, anything else I can try?
    – lnelson92
    Sep 26, 2016 at 22:08
  • @lnelson92 any solution found for this as the round($price,4) is also not working for me.
    – Yogita
    May 17, 2018 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.