Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FO - Cart Rule error with multi-conditions #26528

Open
Tracked by #13823
daniel-imax opened this issue Nov 5, 2021 · 5 comments
Open
Tracked by #13823

FO - Cart Rule error with multi-conditions #26528

daniel-imax opened this issue Nov 5, 2021 · 5 comments
Labels
1.7.7.5 Affects versions Bug Type: Bug Cart rules Label: Which BO under menu is concerned Discounts Label: Which BO under menu is concerned FO Category: Front Office Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Needs Specs Status: issue needs to be specified Verified The issue has been reproduced

Comments

@daniel-imax
Copy link

daniel-imax commented Nov 5, 2021

Describe the bug

This issue is related to this ticket: #15525
There are an unexpected behavior when you create a cart rule and add multiples rules within the same product selection.

Expected behavior

According with the docs, all the rules within the same product selection must be true to the rule be applyed.

Steps to Reproduce

Steps to reproduce the behavior:

1- Create a new Cart rule
2- Add a new product restriction
3- Inside this product restriction choose products. All products except the products of one manufacturer
4- Add manufacturer restriction and choose the manufacturer which products you didnt selected before
5- Select on "Actions" the Selected products option
6- On the front end, add a product from the choosen products list and another of the choosen manufacturer to the cart.
7- Add the cart rule created to the cart.
8- As the conditions are impossible, it shouldnt let you add the voucher, but it is added and the amount calculated on one of the products.

Screenshots

imagen
imagen
imagen

Additional information

  • PrestaShop version: 1.7.7.5
  • PHP version: N/A
@khouloudbelguith
Copy link
Contributor

Hi @daniel-imax,

Thanks for your report.
I did not manage to reproduce the issue with PS1.7.8.0.
I attached a screen record
https://watch.screencastify.com/v/QIeipMZ24CmYJHmfx78E

Could you please check in the FO > Sitemap > Brand_name => your product is well displayed in the list
Could you please check in the BO > Cart rule > Product selection => the other product is well displayed in the selected list.

Thanks!

@khouloudbelguith khouloudbelguith added 1.7.7.5 Affects versions Bug Type: Bug Cart rules Label: Which BO under menu is concerned Discounts Label: Which BO under menu is concerned NMI Status: issue needs more information FO Category: Front Office labels Nov 5, 2021
@daniel-imax
Copy link
Author

Hello, your video shows exactly the wrong behaviour,
Product Brand1 -> is not in the selected product list but is in the selected brand list
Product Customizable mug -> is in the selected product list but its manufacturer is not in the selected brand list

As the documentation said, both rules must be fullfiled to allow to use the cart rule, but neither product fullfill both rules.
And if the doc are wrong and only one rule is enough, why the rule you show only reduct the 10% of a product (Brand 1 in this case). It should reduct on both products

I mean, if the rules on the same product selection are joined with an "AND" the rules cant be applied, and if are joinned with an "OR" both products must have the discount

@khouloudbelguith
Copy link
Contributor

@daniel-imax, thanks for your feedback.
I think your issue is similar to this ticket: #15525
Can you please confirm?

Thanks!

@daniel-imax
Copy link
Author

@khouloudbelguith, thanks for your fast replay. It seems is just the opposite. The first thing i need to know what is correct, the label "The product(s) are matching one of these" or the docs.
If the lable is correct (checking the code it seems is not), the bug is the amount discounted, and if you create the same rules but on separate "product selections" the behaivour is wrong too (if the label is correct)

@khouloudbelguith
Copy link
Contributor

@daniel-imax, thanks for your feedback.
I manage to reproduce the issue with PS1778 and PS1780
image
image
image

I'll add this to the debug backlog so that it's fixed.

Please be aware that due to the high number of reported issues, some bugs might take a very long time to be resolved. If this issue is important to you and you cannot wait for it to be fixed on the project's own time, we strongly suggest you consider hiring a specialist to help you.

If you manage to get the problem fixed, then please contribute the fix back to the project as a Pull Request. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thanks!

@khouloudbelguith khouloudbelguith changed the title Cart Rule error FO - Cart Rule error with multi-conditons Nov 5, 2021
@khouloudbelguith khouloudbelguith added In analysis Verified The issue has been reproduced Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification and removed NMI Status: issue needs more information labels Nov 5, 2021
@khouloudbelguith khouloudbelguith changed the title FO - Cart Rule error with multi-conditons FO - Cart Rule error with multi-conditions Nov 5, 2021
@eternoendless eternoendless added Needs Specs Status: issue needs to be specified and removed In analysis labels Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.5 Affects versions Bug Type: Bug Cart rules Label: Which BO under menu is concerned Discounts Label: Which BO under menu is concerned FO Category: Front Office Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Needs Specs Status: issue needs to be specified Verified The issue has been reproduced
Projects
None yet
Development

No branches or pull requests

3 participants