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

Re: Lowest price showing on the dawn theme

Solved

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

fljdak
Tourist
12 0 2

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

Accepted Solution (1)

AvadaCommerce
Shopify Partner
3879 839 988

This is an accepted solution.

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

AvadaCommerce_0-1642076648200.png

by below code: 

assign target = product.selected_or_first_available_variant

AvadaCommerce_1-1642076711525.png

 

I hope it would help you.

banned

View solution in original post

Replies 7 (7)

JHKCreate
Shopify Partner
3571 638 930

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!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com

AvadaCommerce
Shopify Partner
3879 839 988

This is an accepted solution.

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

AvadaCommerce_0-1642076648200.png

by below code: 

assign target = product.selected_or_first_available_variant

AvadaCommerce_1-1642076711525.png

 

I hope it would help you.

banned
jbselling21
Visitor
1 0 1

Worked great for me!! thanks for posting this.

scentsnsecrets
Excursionist
12 0 3

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

reftoons
Tourist
3 0 4

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.

natestell
Tourist
12 0 2

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.

Jahid-KlinKode
Excursionist
145 1 5

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