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
Consider cart rule allow list as a block list #32068
Conversation
Hello @stifler97! This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community! |
this edit has two benefits as explained here #19935 (comment)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than a refacto, this looks like a feature modification am I right ?
@MatShir I think you would be interested in this PR
and thank you @stifler97 for your contribution 👍
@PrestaShop/product-team
Yes you are exactly right. Do I need to change the type in my PR ? |
Although that would be a simpler solution, @stifler97 we need to consider merchants upgrading their store. And their existing cart rules. How would you fix that problem ? |
actually there are a few use cases where you want some vouchers to be uncombinable with any voucher, therefore you can empty the table easily as it means anything outside this circle is ready to be joined with another voucher with no issues the main benefit is that we save database storage for other important data. however maybe some merchants need the current behavior. |
I like the idea, but:
👍 |
of course we might face some breaks, but the thing is we can do nothing about it because its a big change and we are doing something completely reversed comparing to the default regarding the breaks. i tested with our loyalty module which generates vouchers. it works just like before when creating vouchers the only issue is that old vouchers are not combinable with each other now |
I like the idea as well, it will solve a lot of issues. I'm wondering if could add this behind a feature flag. So in cases of huge BC, people can still revert the logic. I guess also it can be interesting depending on the business. |
BUT the page is under migration for the next version. @zuk3975 & @jolelievre how can we make it work? |
Yes this is a very good idea, but it is easier said than done now lets imagine you want to disable or enable this new feature, you need to deal with such numbers every time you toggle the switch. this will cause server timeouts i guess. generally I think it is not practical I think instead of using one table for two purposes at a time (old way = allow list) and (new way = block list) we better have two tables separately for this. so if one merchant wants to use the block list only, we do not need to think about updating that table, and instead we just dont care about it any more, we show a warning to the merchant to clear that table on their own risk what do you think? |
So I guess we have to wait a bit that the migration goes futher to add your improvement |
ps_cart_rule_combination
now wants to hold uncombinable cart rules.ps_cart_rule_combination
table to verify that only blocked items are added and combinable cart rules are not added to this table.