I want to display the cheapest variant to my customer when entering a product page, not the first available one.
I already found out one way to solve it would be to re-order the variants, but since they are ordered by size currently, this would not be an ideal option.
Welcome to the Shopify Community! I hope you’re well.
Your solution provided above is exactly what you will do to accomplish what you are looking for. Right now, as you mentioned, they are ordered by size. You will simply sort them by price, instead of size.
There is no way for them to default to sorting by price AND size, it will need to be one or the other. Unless, however, you plan to have your variants priced by their size. To achieve this, simply open the product in your Shopify Admin, and select one of the variant options to open the full list. You can then drop and drag the products in the order you prefer.
In the meantime, it sounds like you greatly care about the user experience. Can you provide more insight into why you are wanting to sort the variants based on the price? This will allow us to provide feedback and what the best practice would be in your situation.
Thanks for your fast reply.
As stated in my initial question, I do not want to re-order my variants. I want to keep the variants in order by the size, as they currently are, while having the cheapest variant “selected” once a customer enters the productpage.
I want to achieve this since I have products which have different prices on different variants, so in the product grid it says “product x - starting from $xx”. When a customer enters a productpage, he should not be prompted with the first variant, which may have a higher price than the “cheapest” one being displayed in the product grid.
My apologies for the late response! I definitely understand what you mean now. I appreciate you taking the time to further explain.
This type of request would require some additional coding to your product template liquid. What theme are you using? If you’re using a Shopify developed theme then one of our Theme Specialists could potentially make this change for you. However, if you’re using a third party theme you will need to contact the developer directly.
If you are using a Shopify developed theme and want to check if this is a supported request, please visit our Help Center and log in to your account to create a support request through live chat, email, or callback. Once you have logged in to your account, type your request in ‘Ask about a topic’, scroll down to ‘Get Support’, and then click ‘Continue.’ You will then see the options at the bottom of the page for chat or callback.