Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Supply Theme Show Price range of Variants on Collections page

Supply Theme Show Price range of Variants on Collections page

kopetski7
Tourist
5 0 2

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

Replies 11 (11)

Wahab_Ahmad
Shopify Partner
773 114 204

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.

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Chat on WhatsApp .
Feel free to contact me Email : wahabahmadghori@gmail.com |
Buy Me A Coffee
kopetski7
Tourist
5 0 2

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

SB_90
Shopify Partner
216 52 70

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? 

Wahab_Ahmad
Shopify Partner
773 114 204

@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

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Chat on WhatsApp .
Feel free to contact me Email : wahabahmadghori@gmail.com |
Buy Me A Coffee
kopetski7
Tourist
5 0 2

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

kopetski7
Tourist
5 0 2

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!!

dev-myk
Tourist
6 0 0

Hi, the same worked for me. Thank you a lot.

But now I also want the price range of variant products to show on the search results page too...Any help will be appreciated. 

Thank you.

dev-myk
Tourist
6 0 0
dev-myk
Tourist
6 0 0

@Wahab_Ahmad , @kopetski7,

Hi, the same solution you provided worked for me. Thank you a lot.

But now I also want the price range of variant products to show on the search results page too...Any help will be appreciated. 

Thank you.

DeeVinyl
Tourist
6 0 3

Any idea why when I add this that some of the variant ranges show, but not all of them? 

Jahid-KlinKode
Excursionist
145 1 5

Hi @kopetski7, learn to easily display variant details on Shopify collection pages by watching this tutorial: