I am currently building an ecommerce site with PHP/MySQL. Recently, I have been working on the Shopping Cart integration. The client wanted to ensure that stock was avail
i do a check for the stock on every reload of the pages during the checkout proccess and redirect them to the cart page with an error message if during the process the items have been sold out.
The stock is reduced only on order confirmed
Also i restore the stock if the order is canceled.