Title: Setting Default Ring Sizes Based on Product Tags in Dawn Theme

Hi Everyone,

I own a Shopify ring studio using the Dawn theme, with products offered in sizes 1 to 35. Currently, all products default to size 1, but I’d like to set the default size to 12 for “female” tagged/titled rings and 18 for “male” ones to streamline the shopping experience.

How can I adjust the Dawn theme code or use another method to automatically set these default sizes based on product tags or titles? Any guidance, including code snippets or strategies, would be immensely helpful.

Thanks for your support!

Shopify’s default behavior is to select the first available variant, so making a non-first variant selected by default may require some custom coding.
Using JavaScript you need to write a script which will works if the product have specific tag.
like this

{% if product.tags contains 'titled rings' %}

{% endif %}

Hey there, @pradnyaghadge . Thanks for taking the time to reach out to the Shopify Community with your question around default variants. My name is Imogen. It’s good to meet you!

We’ve seen similar questions to this in the past, and typically this requires some coding changes to be made on the backend, depending specifically on what you’re looking to have done. For example, we have a thread here from a previous user that has a multitude of potential solutions outlined for them.

However, one potential solution stands out for me! You can re-order your variant option values in the ‘variant options’ section of your product page of your admin, so you can set a desired size option to be displayed by default for specific products! I have an example screenshot I’ll attach below that shows how you can select one of the Variant Options (so Size, for example) and then ‘edit’ the order of the option values (so the specific ring sizes) so a specific variant shows first in the order! I hope this is helpful!