Show Message Based on Product Price

MargzJ
New Member
2 0 0

Hi, I have this code working but its not updating when selecting a different product variant, its not updating if there is another variant selected.

 

{% if product.price >= 220 %}
<span class="product-promo">+ ITEM for FREE</span>
{% endif %}   

 

0 Likes
Jayvin
Shopify Partner
130 17 30

Hi,

You need to add some custom javascript that will read the selected variant price and then show or hide the '.product-promo' element.

0 Likes