How to disable Auto-Select Variant in Dawn 15 theme?

Topic summary

A user seeks to modify Dawn 15 theme’s product variant behavior to prevent auto-selection and require customer interaction before purchase.

Desired functionality:

  • No variant pre-selected on page load
  • “Add to Cart” button initially displays “Select a Language” and remains inactive
  • Validation message appears if customers attempt to proceed without selecting a variant (English, German, or French)
  • Button activates and changes to “Add to Cart” only after variant selection

Proposed solutions:

  • One respondent offered to review the store directly with collaborator access
  • Another outlined a technical approach: conditionally remove the “checked” attribute from radio inputs (preserving it when variant ID exists in URL), implement JavaScript validation to detect option selection, and disable the dynamic buy now button to ensure validation works
  • A third user provided JavaScript code to insert in theme.liquid above the </body> tag

Current status: The original poster tested the provided code but reported it didn’t work. Another user later inquired whether a solution was found, and the response confirmed the issue remains unresolved.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

Hi everyone,

I’m using the Dawn 15 theme and need help modifying the behavior of product variants. This is product in my store:

Here’s what I want to get:

  1. The product page should not auto-select any variant by default.

  2. Initially, the “Add to Cart” button should display as “Select a Language” and remain inactive.

  3. Customers must select a language (English, German, or French) from the options provided. If a customer clicks the inactive button without choosing a language, a message like “Please select a language first” should appear.

  4. After a language is selected, the button text changes to “Add to Cart” and becomes active.

Can anyone guide me on how to achieve this?
Thank you for your time and suggestions!

1 Like

Hey @Juliaaa ,

Thank you for reaching out to check this. I’ll need access to your store to review the theme and determine if custom code is required. If you’re comfortable sharing access, I’d be happy to take a look and provide you with an update accordingly.

Please feel free to message me via email, and I’ll assist you further. Thanks!

Hello @Juliaaa ,

Steps to do it:

  1. Remove attribute “checked” which is added to input radio on page load but make sure to make it conditional.
    I mean if variant ID is available in the URL then don’t do anything to this attribute.

  2. Write a JS code to detect if there option is selected or not. If not show a validation message to the customer else leave atc as it is to perform its action.

  3. For dynamic buy now button. I suggest to disable it if you want to use this feature.

Because with buy now button custom validation will not work.

btw let me know if you need a developer to implement it.

Regards
Guleria

Hi @Juliaaa , Hopefully you have found the solution for this issue, if not then here is the code you can use to solve the issue of product page.


Please follow the steps:

  1. Login in shopify admin.
  2. Click on the Online Store.
  3. Then click on the button next to Customize in live Theme.
  4. Click Edit Code.
  5. Search theme.liquid in the code in left hand side in your theme.
  6. Add the following code in the bottom of the file above tag

If this issue gets resolved, mark the solution so that I can provide more solutions as well.

Thank you so much for the answer, but it doesn’t work :disappointed_face:

Hi,

Did you find a solution ?

Hello,
No, I didn’t :slightly_frowning_face:

1 Like