Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Two shoppers at the same time?!


danvanw

Recommended Posts

I have a scenario when shopping with the osC Cart that could possibly be an overlooked bug in the code.

 

- I have user X online who wants to purchase product A.

- I have user Y online who wants to purchase product A at the same as user X.

- I have stock quantity of 1 for product A and both user X and user Y have added quantity of 1 of product A to their respective shopping carts.

- Both user X and user Y continue to secure checkout at the same time.

- Both user X and user Y finish their transaction at the same time.

- I am now left a quantity of -1 for product A.

- Only one of the users will receive their product and the other won't because of being out of stock.

 

This could cause us some serious difficulties for us maintaining our customer satisfaction and their enjoyable shopping experience with us.

 

My question is, do we have a way of stopping purchases from occuring if there is not sufficient stock, even though at the time the user added it to the cart there was?

(My thoughts were that if we could track who was online and what they had in the cart during the checkout process then that stock could perhaps be reserved until they completed the transaction and then the system would subtract the stock from inventory; or if their transaction declined and the osC session expired the system would release that reserve of stock to other users.)

 

Any ideas are appreciated,

Dan

Dan

Link to comment
Share on other sites

Hi Ajeh,

 

I knew about that setting but in my example above, if product A had an inventory of 1 both users can go to the secure checkout pages because at that stage, the stock is not yet subtracted from the store. The problem I raised was (And I will reword it) how can I stop two users with a quantity of 1 of product A in each of their carts proceeding to the secure checkout pages when I only have 1 in stock to give.

 

I hope I have made myself a bit clearer

 

Dan

Dan

Link to comment
Share on other sites

Hi Wayne,

 

Could you please explain to me how the table locking mechanism has a bearing on this problem please?

I am using MySQL by the way.

 

Thanks,

Dan

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...