How can I fix the sort by price filter to use variant 1 price?

After adding a second variant of $0.75 to my products, the pricing displayed as From $0.75 on the products page. I changed code in price.liquid as per here. It fixed my issue, now I see the first variant pricing ($8.99, $15.99, etc) which is great.

But when I use the sort by price low to high filter, the products don’t show properly. It uses the variant 2 price of the products ($0.75) to sort them instead of variant 1. So then a product with variant 1 price $15.99 shows before a product with variant 1 price $8.99 which is wrong.

How do I get the sort by price filter to use variant 1 price?

Hi @CraveCoffee ,

This is not possible, Shopify default sort by price only supports sorting by the price of the product.

If you want to edit it, you need to use app: https://apps.shopify.com/search?q=sort%20by%20collection

Hope it helps!