Re: Stop pre-selected items

Solved

Stop pre-selected items

robertsolcan
Excursionist
35 0 2

Whenever I want to click on a product, the size is automatically pre-selected. How can I fix this? Do you have any Idea?

Screenshot 2024-06-10 at 15.03.47.png

https://bymo.ro/products/colanti-modelatori-tarix-negru-si-albastru

I'm using the dawn theme, version 14.0.0

Accepted Solution (1)

GTLOfficial
Shopify Partner
562 122 111

This is an accepted solution.

Hello @robertsolcan 

Go to Online store----------> Theme----------->  Edit code --------------------> find this file "product-variant-options.liquid" go to line number 101 to 103 
you will see this code 

 

 

{% if option.selected_value == value %}
        checked
      {% endif %}

 

 


remove this code and save it.

check screen short

sfdgd.png
Please let me know

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh

View solution in original post

Replies 4 (4)

GTLOfficial
Shopify Partner
562 122 111

This is an accepted solution.

Hello @robertsolcan 

Go to Online store----------> Theme----------->  Edit code --------------------> find this file "product-variant-options.liquid" go to line number 101 to 103 
you will see this code 

 

 

{% if option.selected_value == value %}
        checked
      {% endif %}

 

 


remove this code and save it.

check screen short

sfdgd.png
Please let me know

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
robertsolcan
Excursionist
35 0 2

it is half good, I mean that when I click on "Add to cart" , even though I haven't chosen yet any size, it gives me the preselected size. Although, it doesn't show that on the page.

Sweet_Savior_3
Shopify Partner
1336 102 138

Hello @robertsolcan 

 

Welcome to Shopify Community.

 

You have to disable the preselected variants from the code and the JS. It needs some customization. Here's an example of how it will look like :

Sweet_Savior_3_0-1718033382589.png

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
robertsolcan
Excursionist
35 0 2

Ok, but can you help me do this? Please? Where should I do the changes?  In which file?