We have created a public app to help Shopify store owners to allow their customers to buy products and the price is dynamically calculated at the time of the checkout process based on the inputs entered on the page. For this, we use the Shopify public API to create a new variant with the dynamically calculated price. However, we do see that when we create a new variant using API and then to the cart, the price on the cart page shows the price as $0 and no image for up to 10-15 seconds. Then if we refresh that page couple of times, it shows the correct price. It seems like a delay in the system somewhere from the time when the variant is created and when that information is available on the store front end.
Is there a solution to this or any recommendations?
I created a similar functioning custom app for a client in Japan and am experiencing a similar situation.
I can see I get a response back instantly from the API showing the product was created but it will take 5-15 seconds to go through some processing before it appears in the cart.
Did you ever figure how to get it to speed up?
My solution was just to add a loading indicator that holds the product page for about 10 seconds before it goes to the checkout page but still sometimes that's not long enough.
I am also having this problem. No matter how I try to use cart ajax to add the new variant to cart, the problem still exists. I get the new variant id but the title, image and price are gone.
When post request for add is finished, the new item is returned. I don't see any problem in this item
I guess it's a problem in the Shopify backend
Via the Partner support live chat, I submitted another request for 2 weeks with no response at all. The issue is about order edit. I try to follow up but the agent just asked me to wait.
You can try but I've lost my hope with partner support
Can I ask what your temporary solution is? I just have a timer set to 10 seconds to give the backend time to process the item but still, sometimes that is not enough time. If it's not enough time, I overlay a message over the cart saying some data didn't load correctly so they need to reload the page.
I did some poking around checking network requests to see if I could have the page wait until there is some kind of message from Shopify's backend saying the product was loaded properly, but no dice. The only thing I get is the return message from the POST request but that doesn't help anything.
There is no temporary solution yet. I didn't set a long wait time to wait for the changes. If the wait time is too long, the visitors will just go away. This is not good for conversion.
I think you can only ask the customer to refresh the cart page.