Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Since liquid is a server side language I'm having difficulty getting the actual Product price when out of Multiple product variants one is chosen. Can anyone let me know how to get accurate price of Product variant when chosen from multiple options respectively. Based on the product option the Product price needs to be given to javascript variable so that it can be used in client side.
Why not just use Liquid to generate a JSON object containing all the variants?
You could use a for loop, and emit an array containing each variant's iD, title, price, and compare at price.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025