-
Notifications
You must be signed in to change notification settings - Fork 118
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
Can't add items to cart after reaching the payment checkout step #12
Comments
Yeah that's a good point. So there are 2 approaches we can take:
I'm not sure whether one is clearly better than another. But I'd be happy with either. |
I take issue with part of your follow-up to the second proposal, a check for when you are going back from the payment page is not sufficient as one might just close the tab or navigate elsewhere with a link. So just the idea of checking the order state upon adding more items or changing the cart in any way, shape or form would suffice. Are there any potential side effects with either of the two approaches? The first has two consecutive API calls during payment as far as I understood, I'm not sure if that is a great way to handle things in such a crucial step. But that's just my intuition 😛 |
@kyunal yes you are totally correct in your assessment - an action taken on adding would be better. Or - maybe even better: When executing The two consecutive mutations as in option 1 is not necessarily a problem, but we'd need to make sure the first call to |
Is this issue still recent? I believe the payment mechanism in the storefront has been refined since the issue was created. Right now the active order is only set to It might still be good to have a backup mechanism for this event but I think the primary issue has already been eliminated as I haven't been able to reproduce it anymore. |
@kyunal yes I think the main issue is resolved, and what is left is something of a rarer edge case which indeed would be good to take care of if we want to be really solid. |
If you go through the checkout process, up to payment screen, then go back to the store, and try adding some more products to the cart, you get hit with
Order contents may only be modified when in the "AddingItems" state
.I think this makes sense since Vendure has the order state machine, however this needs to be fixed for production usage.
All I can think of is special casing the code that deals with adding a product to the cart, checking the order state, and transitioning back out of the payment order state.
Does this solution make sense or do you have a better idea how to tackle this?
The text was updated successfully, but these errors were encountered: