Development discussions around Shopify APIs
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 seconds. The 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:
Checkout:
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
User | RANK |
---|---|
46 | |
16 | |
9 | |
9 | |
7 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023