Supply Theme Show Price range of Variants on Collections page

Highlighted
Tourist
5 0 1

I have multiple size variants of a particular product which have different prices and I would like the collection page to show that price range instead of the lowest price variant price. Thanks in advance for the help

0 Likes
Highlighted
Shopify Partner
673 109 148

Hello @kopetski7,

Welcome to the Shopify community!
and Thanks for your Good question.

Please share your site URL,
So I will check and provide a solution here.

 

0 Likes
Highlighted
Excursionist
80 19 19

Hi there

Line 76 in the product-grid-item.liquid Snippet.

{% include 'price' with product.price %}

Change that for:

{% include 'price' with product.price_min %} - {% include 'price' with product.price_max %}

That should get you to somewhere near what you need? 

0 Likes
Highlighted
Tourist
5 0 1

Thanks for helping! I edited the code and it worked however now all the products that don't have variants show price-price (so 25.99- 25.99) instead of just the one price. Any ideas how to edit and fix ? Thanks again

0 Likes
Highlighted
Shopify Partner
673 109 148

@kopetski7, Try this

 

{% if  product.price_varies %}
  {% include 'price' with product.price_min %} - {% include 'price' with product.price_max %}
{% else %}
 {% include 'price' with product.price %}
{% endif %}

 

 if useful please mark as like and accept the solution

2 Likes
Highlighted
Tourist
5 0 1

This removed the price from the non variant ones. variant ones are correct, but no price is shown for ones with no variant. 

0 Likes
Highlighted
Tourist
5 0 1

Ok think I figured it out just added another else statement

{% if product.price_varies %} {% include 'price' with product.price_min %} - {% include 'price' with product.price_max %}
{% else %}
{% include 'price' with product.price %}
{% endif %}

Thank you for your Help!!

1 Like