E-commerce stock management considerations

I need some suggestions from ecommerce expertise developers.

I have been using Woocommerce for a shopping cart, and I have created a functionality that it kinds of works like an event manager system. Each product is an event, which has different occurrences in different states, so the metaboxes in the CMS look like this:

Read More

enter image description here

I know how to develop most of the stuff, the problem I am having is with the stock, since it will not come from woocommerce it needs to come from the metabox.

So for the experts on developing ecommerce systems, my question is what should I consider to do this, because the stock is not final until the order is completed, so should I manage sessions or cookies, to get the final quantities. Also what happens if there are 2 users trying to buy the same products at the same time, how this should be programmed?. I am really not sure what stuff should i consider to do this.

Related posts

1 comment

  1. One way to do this would be to reserve one ticket for every person viewing it. Send a heartbeat requiring input from the client back to the server every x minutes (eg 5) to indicate that the person is still interested, and have a limit at which point the ticket is no longer reserved regardless of whether the person is still indicating interest (eg 30 minutes) to guard against bots or people holding tickets for too long.

    You’d then have two numbers essentially:

    • Number of tickets in stock and freely available
    • Number of tickets currently reserved that will either be bought in the near future, or released to the general stock

    This prevents people going to buy a ticket and finding that you’ve sold out in the meantime, and should be quite a transparent system.

Comments are closed.