Showing biggest price on collection page - Avenue Theme

New Member
1 0 0

Hi, 

 

I have recently bought the Avenue Theme which I'm trying to set up. 


Would anyone know how I can edit this code to show only the biggest price (when multiple variants) on the collection page ? 

 

I have found this line of code, in the snippet: product-unit-price.liquid but it is very different from what I had in Debut and I'm a bit lost :(

 

Thanks in advance for your help

 

{% if variant.unit_price_measurement %}<br/><small>{% if variant_free %}{{ 'products.product.up_to' | t }} {% endif %}{{ variant.unit_price | money }}{% if variant_slash == 'true' %}/{% else %}{{ 'products.general.per' | t }}{% endif %}{% if variant.unit_price_measurement.reference_value != 1 %}{{ variant.unit_price_measurement.reference_value }}{% endif %}{{ variant.unit_price_measurement.reference_unit }}</small>{% endif %}
0 Likes
Astronaut
1082 147 272

I'm not familiar with variant.unit_price -- It seems that is only available to people in Germany or France. Typically you could use product.price_max to return the highest price variant. Maybe try that instead of variant.unit_price:

{{ product.price_max | money }}
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Shopify Partner
1141 92 139

try this 

 {% if product.price_min > 0 %}
   {{ product.price_min | money }} {% if product.price_varies %} - {{ product.price_max | money }}{% endif %}
 {% else %}
   {{ settings.free_price_text }} {% if product.price_varies %} - {{ product.price_max | money }}{% endif %}
{{ product.price_max | money }}

 

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes