Post by Nett.pro » Sat Feb 09, 2019 3:14 am

Hi.
I have Opencart 2.0.1.1 After adding taxes to my prices I get at rounding error in total. The point is since it is only possible to add 4 digits to prices before vat/taxes(?) the total sum often can be a bit off, like this example: 179,99 while the total should be 180,- To the customer it show correctly 180,- because I have set the price to show no decimals, but when total is sent to Stripe (Visa) for processing they pay 179,99.

One solution could be to round the total variable, like just add round($variable) in PHP, but do anybody know which variable I should do this with, and where it is located?

User avatar
Newbie

Posts

Joined
Sat Feb 09, 2019 2:39 am

Post by IP_CAM » Sun Feb 17, 2019 1:11 pm

Well, something like this could at least create 'zero-rounded' Values.
Good Luck!
Ernie
Image

Attachments

oc_simple_rounding_prices.jpg

oc_simple_rounding_prices.jpg (186.47 KiB) Viewed 145 times


For Sale: Turnkey URLs with Opencart installed
Present Opencart LIGHT Testsite: http://www.velomech.ch
Attacker IP Blocks are denied from further access to my Sites!
Just contact me for more Information at: jti@jacob.ch
730+ FREE OC Extension-Repositories - from OC v.1.5.x up
on the largest Opencart-Mod Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

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

Users browsing this forum: No registered users and 40 guests