I usually use 2 methods depending on the requirements: 1. Stock = actual stock - cart contents for all users (cart expires after 30 min activity) 2. Stock availability is checked on produc search/display and double checked when the user clicks Confirm Checkout. (Obivously this one has usability implications).
It all depends on what your supplies are like at the end of the day. If you can get extra stock in the next day and ship it straight away - no issues overselling. Andy On Sep 24, 11:44 am, cakeFreak <[email protected]> wrote: > Hey guys, > > my question is about developing an eCommerce solution in PHP, and it > about dealing with stock quantities. > > When you have real products (not services or e-books, for example, but > real books instead) how do you deal with the following situation: > > 1) you have 10 copies of Book "Learning CakePHP" in stock > 2) you have 20 customers in the eCommerce website at the same time > 3) 15 customers add a copy of the Book "Learning CakePHP" to their > shopping chart > 4) only 5 customers finally biught the book > > At this point my question is: how do you work with your stock values? > Decreasing the stock every time a customer adds to chart, is a bit > risky. > Maybe using a kinda average purchasing rate (say only 50% of those > that added to chart bought the book) it would be less risky to manage > stock values? > > Dunno if I'm overcomplicating the problem. Just Curious about your > opinion and solutions to this issue. > > Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
