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?
But how do you handle cart subtotal? Line item price is still zero so the cart subtotal might not be correct
What I do after replacing all the missing prices is to get all the item prices, total them, fix price formatting and replace the original subtotal with the new total using DOM manipulation.
Also, when the user goes to actually check out, the car page will hang and load until all of the correct pricing has been completely added to the cart so you will never have an instance where a customer can checkout with a zero-priced item.
Even I try to use GraphQL (product variant create) to create the new variant. It still takes a long time to show the correct data on the cart page.
Hope Shopify can improve it. It's the backend issue that app developers cannot control. And it's seriously affecting the conversion rate on the cart page
@SanaMinatozaki if you mean my post about a dummy product it's just that, create an unpublish product with placeholder data.
When the custom stuff comes in push that the existing dummy product basically skipping waiting on a roundtrip if you were to create everything at once.
Never seen if it's done in the wild though since its kinda the reverse of what a lot of apps and customizations do: a dummy cart , or loader preventing checkout until the product is ready.
@sagarkohli I actually based my app around the functionality of this app and actually yes you do need to wait 10-20 seconds when you use it.
The app will actually console log how long it takes and the three times I tested it, they all took about 15 seconds
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022