Delay in Shopify Cart Reflecting Newly Created Variants

Delay in Shopify Cart Reflecting Newly Created Variants

miracleexpress
Visitor
1 0 0

I'm dynamically creating product variants on Shopify using the Admin GraphQL API, and then immediately trying to add those variants to the cart using the /cart/add.js AJAX endpoint.

While the variant is technically created successfully and an ID is returned, it seems that Shopify takes several seconds (sometimes up to 30 seconds) to fully index the newly created variant and propagate it to the storefront/cart system. 

 

As a result:

  • When I try to add the variant to the cart immediately after creation, the cart displays a broken line item:

    • No product image

    • No title

    • Variant properties are partially missing

    • Price is shown as 0.00 TL

  • If I refresh the cart page after 30 seconds, the product appears correctly with all the correct data.

This indicates that the variant was created successfully, but Shopify’s cart system did not recognize or fully sync the variant yet at the time it was added.

This only affects the very first few seconds after the variant creation — but it’s enough to result in broken cart UX and zero-priced items until the variant is indexed and visible through storefront APIs. We are using a public app that does the job for us and the variant is being added to the cart in 2-3 seconds. But what's the difference? The shop is www.etulle.com.tr, using the public app at the moment which works okay.

miracleexpress_0-1746151526242.png

 

Replies 0 (0)