AmerTac
December 16, 2021, 5:00pm
1
Right now our pricing shows as follows:
However, we want to show the range instead of the lowest variant price. Ex: first one would be $3.49 - $4.99. And if it doesn’t have a variant we want it to show a single price.
Alternatively we would like to show the product price instead of showing the range. Our product-price-lising.liquid is below:
Thank you in advance!
Hello @AmerTac ,
You have to use the below code:
{{ product.price_min }} - {{ product.price_max }}
by removing the selected line:
AmerTac
December 17, 2021, 2:09pm
3
That worked to show the range, but now does not show it as currency.
@AmerTac
Try this code at the same place (by removing the first one). It’s working on my store.
{%- assign min_price = product.price_min -%}
{%- assign max_price = product.price_max -%}
{%- assign money_price_min = min_price | money -%}
{%- assign money_price_max = max_price | money -%}
{% if available %}
{% if compare_at_price > price %}
{{ compare_at_price | money }}
{% else %}
{% if money_price_min < money_price_max %}
From {{ money_price_min }} To {{ money_price_max }}
{% else %}
{{ money_price_min }}
{% endif %}
{% endif %}
{% else %}
{{ 'products.product.sold_out' | t }}
{% endif %}