Forum
Perch if: Variant on sale
How I can find if the variant is on sale? "variant_on_sale" does not work. I can check "on_sale" but this is for "parent" only. How I can reach "on_sale" for variant?
Thanks
<perch:if exists="has_variants AND variant_on_sale ">
<div class="variant-price">
<perch:variants>
<div class="variant-price__item" id="<perch:variant id="productID" type="text" />">
<span class="on-sale"><perch:variant id="price" type="shop_currency_value" /></span>
<span class="on-sale-price"><perch:variant id="sale_price" type="shop_currency_value" /></span>
</div>
</perch:variants>
</div>
</perch:if>
You'd need to check details on an individual variant within the
perch:variants
tags.Thank You Drew! Works great!