Why does AJAX API fail to pick certain product IDs when adding to cart?

Why does AJAX API fail to pick certain product IDs when adding to cart?

david-kaplan
Shopify Partner
14 0 2

Hi, community, 

I have a problem with picking selected elements when adding items to the cart using AJAX API. 

When I add products with API I first select all selected items from the form. For some products, the input is selected but the id-data is empty, but the rest of the data are selected. 

It only happens for some products.

 Screenshot from 2021-11-08 11-40-21.png

I the picture you can see that product has Id in the document. 

Screenshot from 2021-11-08 11-44-01.png

When I pick that element with JS suddenly the attribute is empty. 

 

Can you please get me some ideas why is that? 
Thank you 
David 

Replies 0 (0)