Shopping cart and stock management
问题 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 available to potential buyers, so I created a stock management system. The shopping cart works as follows: Client adds a quantity of an item to his cart. Item quantity is reserved from available stock in the database. No one else can purchase reserved stock. Stock remains reserved until client processes order - where stock is then