B@se
[@lowest_price@]to [@highest_price@]
[%set [@lowest_price@]%]99999[%/set%] | |
[%set [@highest_price@]%]0[%/set%] | |
[%list_item_variations id:'[@current_sku@]'%] | |
[%param *variation_body%] | |
[%product sku:'[@variation_sku@]'%] | |
[%param *body%] | |
[%if [@price@] < [@^^lowest_price@]%] | |
[%set [@^^lowest_price@] %][@price@][%/set%] | |
[%/if%] | |
[%if [@price@] > [@^^highest_price@]%] | |
[%set [@^^highest_price@] %][@price@][%/set%] | |
[%/if%] | |
[%/param%] | |
[%/product%] | |
[%/param%] | |
[%/list_item_variations%] | |
<span class="text"><b> | |
[%if [@lowest_price@] eq [@highest_price@] %] | |
[%FORMAT type:'currency'%][@lowest_price@][%/FORMAT%] | |
[%else%] | |
From [%FORMAT type:'currency'%][@lowest_price@][%/FORMAT%] - [%FORMAT type:'currency'%][@highest_price@][%/FORMAT%] | |
[%/if%] | |
</b></span> |
Full version if used on the product thumbnail:
[%set [@lowest_price@]%]99999[%/set%]
[%set [@highest_price@]%]0[%/set%]
[%display_child_products id:'[@sku@]'%]
[%param *body%]
[%if [@inpromo@]%]
[%if [@promo_price@] < [@^lowest_price@]%]
[%set [@^lowest_price@] %][@promo_price@][%/set%]
[%/if%]
[%if [@promo_price@] > [@^highest_price@]%]
[%set [@^highest_price@] %][@promo_price@][%/set%]
[%/if%]
[%else%]
[%if [@store_price@] < [@^lowest_price@]%]
[%set [@^lowest_price@] %][@store_price@][%/set%]
[%/if%]
[%if [@store_price@] > [@^highest_price@]%]
[%set [@^highest_price@] %][@store_price@][%/set%]
[%/if%]
[%/if%]
[%/param%]
[%/display_child_products%]
[%if [@has_child@] || [@has_variation@] %]
<span itemprop="price" content="[@highest_price@]">[%format type:'currency'%][@highest_price@][%/format%]</span>
[%else%]
[%if [@inpromo@]%]
Now
<meta itemprop="priceValidUntil" content="[%format type:'date' format:'#Y-#M-#d'%][@promo_end@][%END format%]"/>
<span itemprop="price" content="[@promo_price@]">[%format type:'currency'%][@promo_price@][%/format%]</span>
[%else%]
<span itemprop="price" content="[@store_price@]">[%format type:'currency'%][@store_price@][%/format%]</span>
[%/if%]
[%/if%]
This doesn't work with different user group, work around with
display_child_products
: