Shopify themes, liquid, logos, and UX
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!
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.
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
Yes, it's possible to do that, but the code modifications will be necessary.
@Ollitextiles code modification will be needed where higher variant price will be shown
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025