Online store + CMS

Out of context: Reply #2

  • Started
  • Last post
  • 19 Responses
  • Jaline0

    This was their response:

    "When someone adds something to their cart, we check the database to make sure there are items left for them to buy (both in stock and not already reserved), we also do this same check upon checkout to make sure their cart is good to go.

    So if there is 1 left of an item, and someone adds it to their cart, that is entered into the database, and if someone comes later to add that to their cart, we check the database and see there are none left, and they receive a message saying the item is no longer available.

    However, we believe your store was having items added to the cart so quickly that some were happening within milliseconds of each other, and the database hadn't had time to record the first item added to the cart (which takes a few milliseconds itself). This means additional items were added to the cart that shouldn't have been, and those weren't caught until we validated the cart again on checkout. When that happened, it removed those items from their cart but didn't display a message explaining why.

    This would explain why people that checked out with only one item were succeeding, while others that had multiple were not, because those with only one item hit the checkout validation first, while the others took time to add other items and hit checkout later.

    We've never encountered this issue before because we've never seen items added to people's cart this quickly. So I apologize that your customers felt cheated when their items were removed from their cart, but it was just our system correcting the mistake it found from the initial "add to cart" validation failure.

    In the future we will be making some modifications to our system based on this experience to provide better feedback to buyers explaining why items were removed."

    etc., etc.

    So you see the problem.

    • tell them they can lock a record in mysql while it's being accessed, although I doubt it would do you much good : /mikotondria3
    • assuming they use mysql at all. and innodb. myisam can only lock a whole table. and they need to account for the condition in their codeacescence
    • ... condition in their codeacescence

View thread