After I tried to upgrade the checkout extensibility , below 2 scenarios will trigger bug when I using Ajax API for adding product to cart.
- customer tried to add 10 qty product which has only 5 inventory left into his/her cart
in original version , the cart/add.js , will reject & response 422 error code , then nothing added into cart .
in the new version , the cart/add.js , will also reject & response 422 error code , then , added 5 into cart without any reponse for how many did added.
- customer tried to add 1 qty product which has only 1 inventory left into his/her cart. – success
customer tried to add 1 more qty into his/her cart. – failed with 422 thru cart/add.js , it is normal , as no more stock can added .
but at this time , we call cart/update.js , to remove the product from cart , use line_item.key to make ti qty = 0 , expected success , but it failed with 422 error , & showed no more stock can added .
after above action , when customer , tried to add the same product again into cart, then will be promopted error : 422 , sold out .
Could support help to check with above case ? as shopify recommand to upgrade the checkout extensibility , but the surrounding support is not keeping up with the recommended upgrade .