Prestashop: Logic for displaying some discounts in "My account -> Discounts" is broken

Created on 29 Sep 2018  路  5Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
Read below.

To Reproduce
Steps to reproduce the behavior:

  1. Lets assume that you'll add some coupon code for your customers, free shipping for everyone within a valid code. Ok.
  2. Add new voucher, with some generated code, free shipping, and - this is important - for Customer group only, Highlight option set to "No", other settings with default values.
  3. Now login into your account on Front-Office, go to "Discounts" and... you'll see this code.

Is this the right behavior? In my opinion: no. On "Discounts" page we should have only have:

  • active discounts for a specific customer
  • active discounts with all rules valid for currenly logged in customer ANDHighlight option set to "Yes".

Any scenario to prove my point? Lets imagine that you as a merchant is going to some event, you print "Welcome Vouchers", 100 generated codes added to PrestaShop back-office, free shipping, code, 1 available to use per customer, only for Customer group of course. Now ever customer who is logged in to his account will see those 100 discount codes on "My Account -> Discount"...

Additionnal information
PrestaShop version: 1.7.5.0
PHP version: N/A

1.7.4.2 1.7.6.0 Bug Cart rules Discounts FO Fixed Minor PR available

All 5 comments

Hi @kpodemski,

In the FO => My account => discount, the customer will see all the cart rules so he can use it. (The code is displayed)
But if Total available = 0 < Total available for each user, in the Discount page, the customer has always the code is displayed with quantity > 0 but he can't use it.
image
Steps to reproduce:

  1. Create two customer C1, C2
  2. Create a cart with code only for customers grouyp with:
    2.1 Total available = 1
    2.2 Total available for each user = 1
  3. Navigate to the FO, for each customer, the cart rule is displayed in the discounts page
  4. If C1 just used the cart rule, C2 still see the cart rule with quantity = 1 but he can't used it.
    image

@marionf What do you think?

Best regards, Khouloud

@khouloudbelguith

yeah, so that's the other way to describe this problem, some discounts, even tho they're valid for this customer, should not be listed as they're valid for all customers and there is a place for abuse

@khouloudbelguith
Yes, the customer should see only vouchers that can be used, if the voucher can't be used it shouldn't be displayed

@matks do you think this issue could be fixed with the migration of the cart rule page ?

@colinegin @marionf PR opened with a fix #16638 - try it please

Was this page helpful?
0 / 5 - 0 ratings