How can I display the first variant's price on the collection page?

I’m currently using the dawn theme and have multiple product with 3 different variants, each having their own prices. On the products/collection page the price displayed is the lowest price so if the lowest price is $0, which a lot of the products are because their prescription based products then it will say starting from $0. Is there a way i can make it so that display price on the collections page is the same price as the price of the first variant of the product?

thanks

1 Like

Hi @fljdak

This is certainly doable, do you have any liquid knowledge? If not we’ll do it for you shortly and post the solution here after requesting Collaborator access.

Cheers!

Hi @fljdak ,

To change you follow the instruction:

  1. Go to Online Store->Theme->Edit code
  2. Snippet->/price.liquid->Replace code position:
if use_variant
    assign target = product.selected_or_first_available_variant
  else
    assign target = product
  endif

by below code:

assign target = product.selected_or_first_available_variant

I hope it would help you.

3 Likes

Worked great for me!! thanks for posting this.

1 Like

Is it possible to show all variant prices at a time?
I have two variants for each product and I want to show them like this
$2 - $6

Thanks

1 Like

This code replacement worked great for me! However, I also wonder if there is a way to show the range of pricing in the collection view.

Hmm, that didn’t work on my store. It still displays the lowest priced variant by default, regardless of where that item is in the order.

Hey @fljdak , watch this concise tutorial to learn how to effortlessly show variant details on your Shopify collection pages.