Page 1 of 1

Ecommerce Managing product inventory during payments

Posted: Mon Apr 20, 2009 2:23 pm
by kendall
Hey guys I need some advice...

I am building a shopping cart system and when the payment process is done the product quantity needs to be updated. How can I prevent a scenario where by a customer A is in the mist of purchasing a quantity of products that were available probably 10 seconds before customer B came and JUST bought an amount that would probably deplete the products quantity to a minimum that cannot supply customer A's purchase?

thus
customer a and b see that there are 10 of the same item available
customer A chooses to buy 5
customer B ends up buying 6 right before customer A's transaction goes through

I was thinking to lock the product but i'm not sure how that is possible...

What is usually done?

Re: Ecommerce Managing product inventory during payments

Posted: Mon Apr 20, 2009 3:45 pm
by Christopher
I don't think there is a good way to deal with this, so simple and bulletproof is what I would recommend. The reality is that whichever customer gets there first -- the other customer did not get enough of what they wanted. The customer who got enough is not the problem. You are better off focusing on the customer with the problem, with a backorder system, cancellation process, cross-sell, up-sell, etc.