This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Discount BuyXGetY automatically add #876
Comments
It's a tricky one as then does the item also get automatically removed when you no longer qualify for the discount? Happy to consider a PR. But think it would need to go into 0.3 now, as we really need to finish up on 0.2. |
Yeah it would be automatically removed when no longer eligible. And yep it gets complicated :) I’ll have a go at it over the next couple of weeks - happy for it to wait to 0.3 |
What if the user already had the item in their cart? |
So I would suggest we use the meta on the cart line to indicate it was 'added_by' another cart line id(s) ... then if that/those cart lines are removed then it would remove the free discount. The other option would be to flag it as added by a discount, then on cart item add/edit/remove we validate any line items added by discount to ensure they are still valid and if not remove them. |
Sounds reasonable. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It would be great if there was the option to add Y items automatically to the cart when you have matching X items in your cart. This is really useful for say a free ebook alongside a paperback purchase.
I'd be happy to work on this if it was something you'd consider acceptable?
The text was updated successfully, but these errors were encountered: