Set the product card to display higher priced variant option instead of "from £1"

Set the product card to display higher priced variant option instead of "from £1"

Ollitextiles
New Member
6 0 0

Hi - I'm using the Dawn theme, and want to offer two options for the fabric I sell using variants. I have set up a "Quantity" variant with two options: 1 metre (£16.50) or a 10cm sample (£1). The problem I have is that now the price displays as "From £1" in the product grid on the collection page - I want it to display as £16.50. Can anyone help? Thanks!

Replies 4 (4)

CodingFifty
Shopify Partner
919 138 165

Hi @Ollitextiles,

 

You can fix this by setting the default variant to the 1-metre option (£16.50). Shopify automatically shows the lowest variant price in the product grid, so to override this, you can use custom code. Go to Online Store > Themes > Edit Code, then open card-product.liquid (or a similar file depending on your theme). Look for product.price_min and replace it with product.selected_or_first_available_variant.price. This will ensure the price displayed is for the default or first available variant instead of the lowest one.

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com
Ollitextiles
New Member
6 0 0

Thanks @CodingFifty, I figured this out but then realised I need some collections to display "from £X" and others to display the price of the highest variant - is there any way of doing this?

 

So for example, for this collection I'm happy with the "from" price to display: https://www.textiletraders.co.uk/collections/procion-dyes

 

But for this collection I need it to display the highest variant price because the lower price is for a sample: https://www.textiletraders.co.uk/collections/indian-block-print-fabric

 

CodingFifty
Shopify Partner
919 138 165

Yes, it's possible to do that, but the code modifications will be necessary.

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com

suyash1
Shopify Partner
10989 1360 1738

@Ollitextiles code modification will be needed where higher variant price will be shown

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.