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 ...
    • Problem order cancelled after partial refund

      To make a partial refund on an order paid with Stripe, you have several options, which are explained in this article:  https://desk.202-ecommerce.com/portal/en/kb/articles/how-to-make-a-partial-refund-for-a-stripe-order When the partial refund is ...
    • 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/00-module_overview.md 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 ...