ruby on rails - After Variant Save, Update the Price in StoreFront Shopify
I have a Ruby on Rails Heroku APP that Update the price using an external API, that works perfectly!
After I update the price with:
@variant.price = xx @vatiant.save
The variant Price Update, but to see the price in the Product Page, I have to completely refresh the Page.
I want to know if there's a way to Update the Price with Jquery or Something.
Right now I have an Iframe that shows the Price from the View/Controller in the APP.
You can see it on any product on: www.lovegigio.com (http://www.lovegigio.com)
Thanks! Cesar Rodriguez
You will need to have some mechanism to bind the price in the view to model so it updates when it changes.
I would poll your service for changes in the model, something that compares the existing price in the UI to the price in the server (maybe every 10 seconds)
and after it identifies the change, it calls to update the iframe:
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.