Shopify themes, liquid, logos, and UX
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
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.
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
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?
@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
This removed the price from the non variant ones. variant ones are correct, but no price is shown for ones with no variant.
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!!
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.
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.
Any idea why when I add this that some of the variant ranges show, but not all of them?
Hi @kopetski7, learn to easily display variant details on Shopify collection pages by watching this tutorial:
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024