Change default variant selected in product page

PlaySub
New Member
10 0 0

Hello people!
I am trying to change the default variant that is selected when accesing to the product page.
All my products have 2 variants and I have 2 separated pages to display them by collections.
Let's say I have one page to show all the "new" products and another page to show all the "used" products.
I have created 2 collections and created a page for each collection, so now I have this 2 pages.
The problem I am facing is that when I enter to one product page the default variant selected is "New", and what I would like to achieve is that when I am on the page of the collection "Used" and select a product from there, it will show me this product with the variant "used" selected instead of the default one.
Do you have any idea on how to achieve this?
I am using the Sense theme.

Replies 4 (4)
PlaySub
New Member
10 0 0

Hi! Nice to meet you too, thanks for the suggestion.
Can you please elaborate your idea?, how can I use metafields to achieve this?
Thanks

PlaySub
New Member
10 0 0

I still have the site blocked because it's not live yet and we have some copyright restrictions, unfortunately I cannot share it for now.
If you can somehow explain to me how I could use metafields to change the variant selected when entering a product I would be very thankful. 🙏

PlaySub
New Member
10 0 0

Thanks for the explanation, but "you can select used variant by default using liquid codes" is exactly where I am struggling, do you know what code can I use to change the default variant?

DK_05
Visitor
1 0 0

Let me know if you found a solution for this, I also need the same functionality in the prestige theme.

I've some bestselling products for which I launch new colors every month, I want to show a particular variant color (recently added) to show as a featured image in the "New Arrival" collection while the order of the original variants will remain the same in any other collections.