-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
[Vouchers] Fix order with voucher redirect to homepage after cart edit #10941
[Vouchers] Fix order with voucher redirect to homepage after cart edit #10941
Conversation
There is no functional difference between `describe` and `context`, the later being alias of the former, but it makes a difference on the code readability.
In the case when an order total is 0 due to a voucher being applied, and going through a checkout after a cart update, the order was confirmed autmatically and the customer was redirected to the homepage. In this scenario the order was considered a "Free order". To fix the issue we require payment for any order with a voucher applied.
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.
Seems a bit hacky but good to solve for now. I guess that we still have a problem with zero-price products and no vouchers in the cart.
Hey @rioug I ended up doing some work on Vouchers while you were away and I've already got quite a substantial branch that addresses this issue around the order having zero total and a few other things as well, like:
I haven't pushed it yet because it's effectively blocked waiting for PR #10913 to resolve issues around removing the split checkout feature toggle and updating the related checkout specs... |
@Matt-Yorkley, that's really cool. It's just a shame that we are doubling up on work here. Let's coordinate a bit better. @rioug has been tasked with the Vouchers work for most part of this year now. Can you maybe outline the tasks that are still ahead (in budget) and then you two can agree on who's doing what? In the meantime, while we wait for pull requests to be merged and rebased, maybe @rioug could pick up some other little tasks. Fixing some flaky specs is always worthwhile in the long term. |
Thanks @Matt-Yorkley , I would have been good to know you were working on this.
I have been doing something similar while looking at #10857, I'll create a PR with what I have so far and we can look at it once we are unblocked by #10913 and you have pushed your work. |
Yeah, sorry. I got assigned to the Vouchers epic while @rioug was away and started looking at addressing the open issues, then I realised there was a lot of overlap with open checkout issues and vouchers issues, and I realised it was all kind of blocked until #10913 was resolved, so I had to pivot to helping Mohamed finish that off as the top priority and I ran out of time towards the end of the week. I've been focussing on the behaviour around applying vouchers during checkout but the issues related to the admin vouchers UI (#10870 and #10871) are available to be worked on and shouldn't overlap. |
I missed that sorry, I should have checked with you. I am assuming you'll look at this one as well #10855 ?
I'll leave these for now, I am not sure we have the budget for it. |
Will be superseded by #11003 |
Should we close here then? |
Yes we should, closing. |
What? Why?
After applying a voucher to an order and editing the order so that the total ends up being 0, when one goes through checkout again, the order was automatically confirmed when clicking on 'Next - Payment method'. This happened because the order was now considered a "free order" and payment was skipped. This is in place to allow unpaid subscription order to be completed.
So to avoid this issue, we make sure that payment is required for any order with a voucher applied.
What should we test?
-> The payment step should load and the voucher should still be applied to the order (Note the voucher might be missing due to [Vouchers] Errors when/from iterating between /summary and /cart page #10857)
Release notes
Changelog Category: User facing changes
The title of the pull request will be included in the release notes.