Replies: 1 comment
-
hey @garpunkal I've converted this to a discussion as I don't think it's a fully formed enhancement just yet. I'm not sure if the discounts feels like the right place for this. 🤔 From a technical perspective, the discounts are executed during a calculation pipeline and if these are calculated based on the state of the order. If discounts were to be able to assign new order lines, this would effectively alter the order state and require a re-calculation, potentially doubling the calculation time. A more logical time to do this would be at the point of adding the item to the order. I think this could be done with custom code currently, maybe storing on the product any "free products" along with minimum quantities of the parent product before this free product is added. Then whenever a product is added or it's quantity is changed, you could look back to the product node through it's "free products" collection and see if any qualify and auto add the order line. I'm not quite sure the best approach for this as an otb solution though 🤔 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
Not related to a problem
Describe the solution you'd like
We would like the ability to add a product to the order, if a reward is triggered.
For example:
You add product A to the cart. This will trigger the OrderLineProductDiscountRule.
If rule triggered, we would like a reward to add a set product to the cart with zero price.
Buy Product A and get Product B free.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I've tried this, but it doesn't work.
This unfortunately didn't work, possibly because it's already in a SaveOrder stack.
Additional context
We some how need a property on the following return object: ProductRewardProvider to assign new orderlines.
Happy to discuss further as always.
Beta Was this translation helpful? Give feedback.
All reactions