-
Notifications
You must be signed in to change notification settings - Fork 93
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
Prevent checking out if there are unavailable products in the cart (OCC-199) #375
Comments
As far as I can see, the one way to reproduce this is to alter the product's inventory after it's been added to the cart because the "Add to cart" button's clickability is based on the product's inventory (i.e. if it cannot be bought, the button cannot be clicked and the product cannot appear in the cart). I'm fixing that; just wondering if you found other ways to repro the bug? |
I added the part of the checkout prevention that's responsible for preventing manually navigating to the checkout page and for the redirection back to the cart in This was then used in 373 is a bit of a monster PR to comprehend in one sitting, do you have any suggestions where I could place this logic instead, @sarahelsaig? Or perhaps moving |
At the start of |
That does the trick, thanks! |
Describe the bug
Currently you can try to check out an order with "Inventory: 0" and it will only fail after the payment is already made.
To Reproduce
Steps to reproduce the behavior:
InvalidOperationException
after the payment has been processed!Expected behavior
~/checkout
url.Screenshots
Jira issue
The text was updated successfully, but these errors were encountered: