Post by Reptile » Tue Nov 21, 2017 5:53 pm

On my website I use USD as primary currency but at the checkout I convert it to EUR (for tax reasons).
This works great only on a few occasions a bug will happen with PayPal.

For example I sold a product for € 10.2411399 (according to the Opencart database)
This is displayed in Admin as € 10.24
But I receive € 10.25 on my PayPal account.

This will give a mismatch of 1 cent.
Because of this mismatch Opencart puts the product in Processing instead of Complete.

Has anyone encountered this behaviour before?
And does anyone know who I might be able to fix this?

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands

Post by paulfeakins » Tue Nov 21, 2017 8:11 pm

Yeah your best bet is probably asking a developer from the Commercial Support forum to adjust it so it rounds up instead of down.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Reptile » Tue Nov 21, 2017 8:33 pm

I am a developer myself but are a bit stuck.
Using php round I can get the last 2 numbers after the decimal to round up but I can't get the 7 numbers after the decimal to round up.

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands

Post by paulfeakins » Wed Nov 22, 2017 6:50 pm

Code: Select all

round( $amount, 2, PHP_ROUND_HALF_UP )

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Reptile » Thu Nov 23, 2017 2:07 am

Thank you already tried it but doesn’t work.
Because the store amount value in the database has 7 digits behind the decimal point.
And your code sugestion only applies to 2 digits after the decimal point.

It needs to round up the 7 digits after the decimal point but on this I am stuck.

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands

Post by agatha65 » Thu Nov 23, 2017 6:40 am

I have the same problem on a client site(this payment is not very used in this store), but don't have time to work on it.
Please, if you find a solution put it here. ::)

Print Version for Product Page and Product Compare Page | Rich Snippets | Facebook Open Graph Meta Tags | Information pages in top menu | Multi-Language Banners, Sliders and Carousels
Image


User avatar
Active Member

Posts

Joined
Fri Mar 16, 2012 10:18 am
Location - Canada, QC

Post by straightlight » Thu Nov 23, 2017 7:22 am

This issue has been posted before. See if the followed solution solves the issue: viewtopic.php?f=202&t=194404&p=694537&h ... rd#p694537

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 14 guests