Problem of Rounding with Prestashop

Problem of Rounding with Prestashop

PrestaShop allows you to configure the price of articles in the catalog by specifying up to six digits after the comma. 

It will therefore be possible to specify a price such as €9.123456.

The PayPal module, on the other hand, processes prices by taking into account only two digits after the comma.

For example, a product in your PrestaShop catalog is priced at €9.999. 
The PayPal module, in this case "sees" a price of €9.99.

This can lead to differences in the amount when paying for the order.

For example, the purchase of 100 items at €0.899 will equal €89.90.
Whereas, the purchase of 100 items at €0.89 will equal €89.

This difference results in 90 cents difference on the order.

To avoid this type of problem, it is necessary to configure PrestaShop to round the price of each article in the order.

To do this, in the back office of your PrestaShop site, click on the menu item "Preferences" > "General".
Then set the rounding rules as shown in the image below.

Round mode: Round up away from zero
Rounding type: rounding each item
Number of decimals: 2

This configuration is currently mandatory for the PayPal module for PrestaShop to work properly.

A different configuration of these options may cause the module to malfunction due to rounding differences.

    • Related Articles

    • PrestaShop 1.7.5.X: Problem on cart total when using discounts

      PrestaShop 1.7.5.X versions allowed us to reproduce a bug in the cart total calculation when using discounts. Specifically, the problem reproduces if two (or more) discounts are used at the same time, such as: - a percentage discount  - a specific ...
    • Connection problem between the eBay account and the module

      The first step in the process of configuring the module is the association with the eBay profile. Sometimes this is done via the appropriate button in the module configuration. The link will be made by indicating the user of the eBay account and the ...
    • Problem: points earned by customers are not awarded

      Some merchants are experiencing anomalies with the allocation of points. The points are attributed by the module, automatically, after the purchase. At this stage, the points are not usable and remain pending validation. Only validation will allow ...
    • Shoppingfeed Prestashop module developper guide

      Generalities Source: 00-overview/ Some useful links : The Shopping Feed API documentation ...Which shouldn't be necessary since we're using the Shopping Feed PHP SDK. This module will replace the shoppingfluxexport module since ...
    • Updating Module Paypal of Prestashop via FTP

      Following the problem of the module PayPal on prestashop, we have updated the module. To update the module, it is necessary to use an FTP client (filezilla, winscp …). Here are the steps you need to follow: Download the last version. Unzip the zip ...