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


My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


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


Expert 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

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!
Last edited by secretgarden on Tue May 11, 2021 11:32 am, edited 5 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 24 guests