BUG on the theme layer / liquid. CART product variant data is EMPTY for 10-20 seconds.

danielkolb
Shopify Expert
3 0 1

I think we have found a critical bug on the theme frontend layer. @Liam @TyW 

When creating a product variant via the GraphQL Admin API the product can be added to the cart but its properties won’t be available in liquid for up to 20 secondsThe cart page just shows an empty product in the cart without a title, price and image. The cart totals are also wrong.

If the user proceeds to checkout, all of the data is there. It’s just not available in the theme via liquid. I’ll attach screenshot from the same product in the cart and in the checkout.
This does not happen when creating products, only when creating product variants.

This is a huge issue for several of our merchants as we’ve built a couple of product builder apps that will dynamically generate new product variants when the “add to cart” button on the product page gets clicked.We’ve already discussed the issue with less details here: https://shopifypartners.slack.com/archives/C4E704GBX/p1634411268345200

Some time ago this was working fine and now it seems to have stopped working since then. Can’t say for sure when it exactly broke.

Cart:

cart.PNG

Checkout:

checkout.PNG

Reply 1 (1)
sillycube
Shopify Partner
555 14 86

From this thread, look like Shopify is doing indexing at the back. The issue has been existing for a while. Except waiting, I don't know what are the possible options

Also, you have to set the inventory policy to null during variant creation. Otherwise, it may show that the variant is sold out. 

IMO, this part is very buggy

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview