Handle inelegible products "free gift" discount#41050
Conversation
b23e3f4 to
1a6d290
Compare
|
This pull request seems to contain new translation strings. I have summarized them below to ease up review:
(Note: this is an automated message, but answering it will reach a real human) |
5fd9708 to
95c2d2b
Compare
|
What if the user wants to prepare cart rule and then activate the rule and gift together? |
|
ping @ibahloul-ps |
|
@Hlavtox in fact, I don't understand your question. Is this related to this pull request? |
|
@nicosomb Of course, what else are you implementing? :-) You are preventing creating of cart rule if a product is out of stock or disabled, but that essentially prevents you from creating this cart rule in advance. I think that a merchant should be able to create this cart rule. If the gift product is not enabled or out of stock, the cart rule is just not usable. ping @kpodemski |
|
I agree. The validation should be in the |
Hello guys It should not be the case, we just want to prevent creation/application of discount when a product is not eligible like described here :
everything else must work as before We agreed on that a few months ago 👍 |
Makes sense.
Makes sense.
Does not make sense. You may want to add a product for the gift that isn't normally available to order, I think. Cc @Hlavtox |
|
@kpodemski That won't work. A gift must be normally orderable product. IMHO this is how it should be and this should be the current behavior:
Yeah, you may want, but you cannot do it. I have many examples where we want to give gifts and we don't want people to order it separately. Cannot do it in PrestaShop and we won't be able to do it even with the new discount system. I have to do all kinds of hacks to hide the product, block it from ordering, hiding it from search etc. Unfortunately, basically no usecase I know of has been resolved with the new discount UI... |
We are aligned, that is exactly the purpose of the related issue 👍
What do you mean? Can you share some examples plz 🙏 |
You know how sometimes you get a drink, some sample of perfume or whatever, and it has This is the same case - I had many cases where our company, or my other clients, wanted to give some product as a gift, but we didn't want to sell it separately. For example, a pack of coffee. So, you create a product, set it's price to zero, so the total amounts of orders is not affected. (see #38325). Create the cart rule etc. All good. But, if a price is zero, you don't want people to be able to order it, so what you can do is to set visibility to "Nowhere", you can write "Not for individual sale" into the description. But some "curious customer" will always find it and create a new order with 0 CZK for 5 packs of coffee. :-D |
|
Exactly, that's one of the common cases I've seen. I've always had to modify the core to prevent ordering some sample products as individual items. |
|
@Hlavtox @kpodemski thanks to your review, i made some changes. |
| return [true, $this->translator->trans('This product has required customization fields.', [], 'Admin.Catalog.Notification')]; | ||
| } | ||
|
|
||
| $stockQuantity = (int) ($productRow['stock_quantity'] ?? 0); |
There was a problem hiding this comment.
No, this should not turn the discount into a disabled state; this part should be tested dynamically in the checkValidity function (and probably already is)
Uh oh!
There was an error while loading. Please reload this page.