Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify Bug Of The Ajax API After Upgrade The New Checkout Extension

Shopify Bug Of The Ajax API After Upgrade The New Checkout Extension

John-CC
Shopify Partner
15 0 4

After I tried to upgrade the checkout extensibility , below 2 scenarios will trigger bug when I using Ajax API for adding product to cart.

 

1.   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.

 

2.  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 .

Replies 6 (6)

Liam
Community Manager
3108 344 892

Hi John,

 

Thanks for flagging this - I've connected with our internal teams to investigate this behaviour and I'll update here asap.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

John-CC
Shopify Partner
15 0 4

hi , @Liam  , may I know is there any update ?

Liam
Community Manager
3108 344 892

Hi John-CC,

 

Our team were not able to replicate this, is it possible this issue is due to an app which was installed? Updating to the new checkout should not affect how the AJAX API works. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

John-CC
Shopify Partner
15 0 4

nope , our testing team tested with this scenario , it would resume once we revert the checkout upgrade & appear again after we upgrade .

KenanOzbelli
Shopify Partner
1 0 0

I can also confirm this happens to our stores as well.

Kenan Ozbelli