Page 1 of 1

Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Sat Mar 28, 2020 9:18 am
by PlugGuy
Item 27.95
Shipping 4.95
10% off
Resulting total should be 30.10 but shows up as 30.11 after $2.80 is reduced from item (not applied to shipping on purpose)

When customer gets to final checkout, it throws the 'items in cart' error message and won't take payment.

Did anyone come up with a fix for this, or is there an extension to correct it?

1.5.5.1
been going on all day during a promo run

Image

Re: Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Sat Mar 28, 2020 9:30 am
by IP_CAM

Re: Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Sun Mar 29, 2020 12:13 am
by PlugGuy
Nothing online or in forums, so I tweaked the % setting to 9.99 instead of 10. Problem seems to have resolved for now.

It's all about the pennies. :-\

Re: Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Sun Mar 29, 2020 12:58 am
by ADD Creative
The reason is that OpenCart calculates the the total with more precision than it displays. 10% of 27.95 would be 2.795, so the calculation will be as below.

27.95 + 4.95 - 2.795 = 30.105

30.105 will then be converted to 2 decimal places giving 30.11. A common fix for single currency stores, is to round the values to the same decimal places as the currency, before adding together.

Re: Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Fri Apr 24, 2020 12:23 pm
by secretgarden
PlugGuy wrote:
Sat Mar 28, 2020 9:18 am
Item 27.95
Shipping 4.95
10% off

Can you try the best hardware wallets on Reddit?
For security use the best password managers on Reddit.

Namecheap is okay, but look at the best web hosting reddit.
For rotating proxies and Netflix, the best proxies list is useful.

Resulting total should be 30.10 but shows up as 30.11 after $2.80 is reduced from item (not applied to shipping on purpose)

Sometimes it's better to use a VPN, and it's easy to find the best vpn on reddit.

When customer gets to final checkout, it throws the 'items in cart' error message and won't take coupons.
Did anyone come up with a fix for this, or is there an extension to correct it?

1.5.5.1
been going on all day during a promo deal

Image
Same issue here!

Re: Was there ever a fix for coupon price reduction causing errors at checkout?

Posted: Fri Apr 24, 2020 11:50 pm
by PlugGuy
Our fix entailed simply reducing the actual percentage applied to get the numbers to work.

10% off was changed to 9.99% or something close, and the math seemed to work fine, and solve the issue.