Jump to content

Rounding issue 3.4.6


mrotacon

Recommended Posts

hi there.

 

I've just started using the prestashop team paypal menu on the site for the company I work for.

However, we have run into a problem.

 

This is module version: 3.4.6, Prestashop Version 1.5.3.1

 

There seems to be a rounding issue with the module. The price paid in paypal is higher than the price in prestashop for some transactions, and because of this , payment will subsequently fail.

 

I'm not sure what the issue is, but if someone can take a look and perhaps point me in the right direction that would be great.

 

A Random product that it occurs on: here

To submit to paypal, you will need to login.

 

Please use:

Email: [email protected]

Password: testclient

 

Please add more than 5 to a basket. see the price breakdown on the shopping cart page and submit to paypal, and see the difference. Paypal is usually a couple of pence higher per product.

 

Thanks

Link to comment
Share on other sites

I'm sorry - this can be closed.

As a notice for people having the same issue, this is a prestashop bug.

Also apparent in PrestaShpop 1.5.4RC4.

 

in file /classes/Product.php

under

 

public static function priceCalculation

 

find all instanced of

 

$price = Tools::ps_round($price, $decimals);

 

and comment them out

 

// $price = Tools::ps_round($price, $decimals);

 

That will solve the rounding issue. Why tax percentile values were being rounded in this way I do not understand ???

Surely this problem has been encountered before by other users?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...