The shopping cart is potentially flawed in that there is no way to protect the vendor and user from outdated date.
If the customer adds an item to cart, leaves the page, then returns and makes a purchase, they run the risk that someone else may have taken the item out of stock.
Solution.
When a user adds an item to cart, their cart should reserve the item for a short period of time (10 minutes). If the user ends their session, once the cart time expires the cart will release said items back into the general stock.
This will protect both the vendor and the user.
The shopping cart is potentially flawed in that there is no way to protect the vendor and user from outdated date.
If the customer adds an item to cart, leaves the page, then returns and makes a purchase, they run the risk that someone else may have taken the item out of stock.
Solution.
When a user adds an item to cart, their cart should reserve the item for a short period of time (10 minutes). If the user ends their session, once the cart time expires the cart will release said items back into the general stock.
This will protect both the vendor and the user.