How do online stores handle 2 customers that add the last item to their cart?
- by Alex
I'm making a store web app for a college class. I'm wondering what do stores like Amazon do when there is only 1 item left?
Do they let multiple customers add the last item to their cart, and whoever checks out first gets it? Meaning that the inventory database is updated after purchase.
or
Do they let only one customer add the last item to their cart and remove the item from the inventory. If the customer's session times out, then the item is put back in the inventory.