Post by PlugGuy » Sat Mar 28, 2020 9:18 am

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

Chief Plug Guy
BumperPlugs.com


User avatar
Active Member

Posts

Joined
Fri Jan 25, 2013 11:11 pm


Post by IP_CAM » Sat Mar 28, 2020 9:30 am


I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by PlugGuy » Sun Mar 29, 2020 12:13 am

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. :-\

Chief Plug Guy
BumperPlugs.com


User avatar
Active Member

Posts

Joined
Fri Jan 25, 2013 11:11 pm


Post by ADD Creative » Sun Mar 29, 2020 12:58 am

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.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by secretgarden » Fri Apr 24, 2020 12:23 pm

PlugGuy wrote:
Sat Mar 28, 2020 9:18 am
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 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!
Last edited by secretgarden on Fri May 15, 2020 5:22 am, edited 2 times in total.

Newbie

Posts

Joined
Fri Apr 24, 2020 12:01 pm

Post by PlugGuy » Fri Apr 24, 2020 11:50 pm

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.

Chief Plug Guy
BumperPlugs.com


User avatar
Active Member

Posts

Joined
Fri Jan 25, 2013 11:11 pm

Who is online

Users browsing this forum: No registered users and 7 guests