Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hello there,
I have a problem with my code. I create a new variation with the API, add it to the cart then redirect to the cart page. The cart page will then contain the newly added item, but with a price of $0. If a wait a little bit or refresh, the price will be set correctly. I feel like Shopify needs to process something before making the price available. I know I can fetch cart.js until the price is okay, but I was wondering if there is any other way to wait for the price to bet set before redirecting to the cart page.
Thank you,
Vincent
Hello,
If it gets reset as soon as the page loads, you could fetch the variant price along with the item and just add it in the displayed element using jquery or just javascript.
When the page loads, the expected behavior will resume.
No, it's not getting reset. But the new variant options and product name cannot be shown. You can refer to a post I made on SO. There is a screenshot.
Would it be possible to post the code you wrote to do this? I'd like to see what's going wrong.
Also correcting it would be easier.
User | RANK |
---|---|
32 | |
28 | |
19 | |
9 | |
9 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By