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!
Topic summary
A Shopify store owner using the Dawn theme wants to control how variant prices display on collection pages. Their fabric products have two variants: a £16.50 (1 metre) option and a £1 (10cm sample) option. Currently, the product grid shows “From £1” but they want it to display £16.50 instead.
Initial Solution Proposed:
- Set the default variant to the higher-priced option
- Modify
card-product.liquidfile - Replace
product.price_minwithproduct.selected_or_first_available_variant.price
Complication:
The store owner needs different display logic for different collections:
- Some collections should show “from £X” (lowest price)
- Others should show the highest variant price (when lower price is just for samples)
Current Status:
The discussion remains open. Custom code modifications are confirmed as necessary to achieve collection-specific price display logic, but specific implementation details have not yet been provided.
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.
@Ollitextiles code modification will be needed where higher variant price will be shown
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.