charlestcr Posted August 6, 2016 Share Posted August 6, 2016 ....what will happen if two order placed simultaneously....if stock is less ..what will happen...i want out of stock products cannot be ordered... Link to comment Share on other sites More sharing options...
Dh42 Posted August 7, 2016 Share Posted August 7, 2016 One will be placed before the order and the other order will be rejected as not having enough product in stock. The orders table is locked when an order is being written to the database, so when the other order will be placed in a wait state for a few milliseconds while this is happening, then when the first order is done, the second will start to process and check the stock. There will be a stock error so it will kick them out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now