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

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 amount discount
- a product is offered as a gift 

In this case, the total displayed on PrestaShop, before checkout, will be different from the total displayed by PayPal during checkout.


In the example, a shopping cart with two products for a total amount of €136.80 euros including VAT.
In the same shopping cart, two discounts have been added :
- a discount of €5
- a gift product worth €42

PrestaShop displays a total of €91.34. 
But the correct total is 136.80-5-42 > €89.80

PayPal, on the other hand, calculates the total correctly at checkout.



The calculation difference between PayPal and PrestaShop can create "payment error" in PrestaShop 1.7.5.X.

This problem does not affect all versions of PrestaShop and the bug is fixed by PrestaShop from version 1.7.6.

We encourage you to upgrade your PrestaShop to newer versions to avoid this problem.