1 / 3
Apr 2009

Not sure how this is possible. It has happened twice, back to back with different variants of an item. I'm selling a single tee shirt with different sizes. Here are the config options i have checked:

Inventory Control

Sales Tax, VAT

Shipping/Buyers Address

Let Buyers edit quantity in cart

Variants having different price/weight/stock/SKU



and then on the proceeding page i have my options broken down like this, repeated for the different sizes of shirts:

SKU,price,weight,stock,size,,



everything worked like clockwork. i get emails when stock gets down to 5 left and then an email every time it goes down after that. once it gets to 0, the cart no longer allows the user to buy the item and gives them a popup saying so.



but today, with 0 items of any of my sizes left in stock, i see i sold 2 more tee shirts! and i get emails saying -1 Medium left in stock; and -1 XL left in stock.



how is this possible? i went back to the cart and tried to do it myself but i get the pop up. the only thing i can think of is these 2 people placed their item in the cart when it was still in stock, but didnt buy it. left the site. came back today, clicked on their View Cart link and saw the item was still in there. clicked on buy and continued to purchase. is that possible? not sure. its the only thing i can think of.



any help would be appreciated. i've enjoyed e-junkie so far. no other issues. pretty smooth integration.

  • created

    Apr '09
  • last reply

    Apr '09
  • 2

    replies

  • 951

    views

  • 2

    users

Hm, interesting. I think your explanation of how it could have happened seems plausible. The stock count only gets decremented for actual completed sales, but it limits how many units a buyer can add in their cart.



I'm not a developer here and don't know in precise detail exactly how the inventory routine actually works on our backend, but it might be that if you had, say, 9 items in stock, and Buyer A and B both add 5 units of that item to their cart (which is possible because 5<9 and no units have actually been bought yet), then Buyer A could checkout reducing stock to 4 units, but buyer B already got 5 units in their cart, so if they don't close and reopen their cart (which should revise their order qty to match available stock), they might be able to proceed to checkout for all 5 units, thus reducing stock to -1.



I'll assign this to the attention of our Lead Developer to see what we can do to handle this rare fringe case, maybe add a final inventory check before we send an order to checkout if items with Inventory Control are in the cart. We might already do that however, so the fringe case would happen if Buyer A and B both went to checkout for 5 units, and Buyer B was already in the middle of their checkout by the time Buyer A completed theirs.

here is what appears to have happened:

these were pending sales made via e-check. that answers how they went through after stock ran out.



however i am still confused as to how these pending sales weren't allowed to count against inventory. so in our hypothetical situation, if there was 1 item left in stock and guy A comes in and buys it with an e-check, since the sale is pending, the cart doesnt count it against the inventory and leaves 1 left in stock. guy B then comes along and purchases that last tee via credit/debit card and zeroes out the stock. a day or two later guy A's e-check goes through and the cart allows the transaction because it started while there was something still in stock.



i think thats how this played out. can you verify this?

and if it is how it happened, can you recommend ways to avoid it in the future?



thanks for you help, tyson.