Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, There are so many community posts event in the Shopify cheat sheet explain how to use
<h2>price_min:{{ product.price_min }} || price_max:{{ product.price_max }} || price:{{ product.price }} || price_varies: {{ product.price_varies }}</h2>
I'm wondering how I can set price_varies to true.
Please help...
Solved! Go to the solution
This is an accepted solution.
price_varies is a value you get from the liquid product object, not a value you set. You can find the documentation about product.price_varies here.
As the documentation states, {{ product.price_varies }} returns true if the product's variant prices vary. Returns false if not.
If you want price_varies to be true, then the product needs to have multiple variants with different prices.
This is an accepted solution.
price_varies is a value you get from the liquid product object, not a value you set. You can find the documentation about product.price_varies here.
As the documentation states, {{ product.price_varies }} returns true if the product's variant prices vary. Returns false if not.
If you want price_varies to be true, then the product needs to have multiple variants with different prices.
Hi @MaxDesign
Thanks for your quick response.
Request you to refer the below product JSON
https://shoponcliq.com/products/personalized-blue-whale-slim-phone-case-cover.json
Which has multiple variants but still missing the price_varies field missing.
You need to access the price_varies value with javascript? In that case you could parse it from a script tag, for instance:
<script type="application/json">
{{ product | json }}
</script>
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024