Prestashop: Calculation of discounts - Discount of a cart rule with percentage reduction restricted to specific product

Created on 13 Feb 2020  路  5Comments  路  Source: PrestaShop/PrestaShop

When a cart rule is created with percentage reduction on specific product, the discounts subtotal is calculated on final price and not on unit price of that specific product.

To Reproduce

  1. Go to BO => Catalog => Discounts => Create a new cart rule
    1.1 Give a name to the cart rule.
    1.2 As an action => Apply a discount Percent = 100% => Apply a discount to: "Specific product".
    1.3 Choose a product (demo_1 hummingbird printed t-shirt).
  2. Go to FO, add whatever products in cart, but including demo_1.
  3. Increase the quantity of demo_1 to 10 for example.
  4. See behaviour in screenshot.

Screenshots
specific product - percentage reduction cart rule - discounts calculation

Additional information
PrestaShop version: 1.7.7.x, 1.7.6.3
PHP version: 7.2

1.7.5.2 1.7.6.3 1.7.7.0 1.7.7.x Bug Cart rules Discounts FO TBS waiting for PM

All 5 comments

Hi @arouiadib,

Thanks for your report.
I have the same behavior as PS1.7.5.2, PS1.7.6.3 & branch 1.7.7.x.
But, I think, it is normal behavior.
Ping @PrestaShop/prestashop-product-team @MatShir what do you think?
We apply 100% for a product demo_1 & there is no quantity specified in this case
image

Thanks!

Thank you very much @khouloudbelguith for your time.

Let me please add another example, and I hope my confusions will be cleared this time.

A shop with 5 products: Product1, ...Product5 with an available quantity of 100 item each.
The merchant wants to give a percentage discount restricted to Product5.
And a cart that contains:
Product1 with quantity= 1
Product5 with quantity = 20

You can see that the customer is able to have a discount on many items while buying only one product from Product[1..4]. If additionally the percentage reduction is set to 100% then, after 5 similar carts , product5 is out of stock and only 4 items are really purchased (Merchant looking for bankruptcy).

Wdyt of using unit price of Product5 instead of final price (unit price * quantity) during calculation? In the case of percentage reduction restricted to the cheapest product, the calculation is based on unit price, which seems nice. As consequence, even if a customer chooses big quantity of the cheapest product, percent discount is calculated from the price of 1 item.

Again thank you very much for the time discussing and answering questions. Happy start of the week

Hello @arouiadib ,

Forget what i just said in the other thread, I misunderstood what you were explaining.
This issue needs a deeper study, but I quite agree with you. IMO the discount should be limited to one unit when you select specific product or cheapest product. It does not really make sense to allow 100% reduction on more than 1 product.
But several scenarios should be studied in depth :

  • what if this specific product is only sold from X quantities ?
  • what if this specific product has a specific price per unit ?

And i'm sure i'm forgetting many other scenarios.
But thanks anyway for raising this issue, we will study it in detail when working on migrating the cart rule page !

Hello @colinegin and thank you for your interesting points.
I agree with you that the migration of cart rule pages in back office is a good opportunity to study in detail current business rules and if necessary, add or modify some of them.

I have edited a draft of specs. I also added the two points you mentioned (that makes me gather things and not forget them till the final work is available for review).

I have closed the PR, but could you please make an edit of this issue( like removing PR available and maybe other filtering stuff). Thank you very much for your time.

Have a nice day.

Hi!

Same behavior with 1770beta2build1
image
image

Thanks!

Was this page helpful?
0 / 5 - 0 ratings