Craft theme selected variant button not visible

Solved

Craft theme selected variant button not visible

momowt
Excursionist
12 0 7

 

How do i make the selected variant button visible? Selecting the variant will make the button invisible, it is confusing to the buyers. 

Screenshot 2024-08-31 at 9.31.13.png

Accepted Solution (1)
niraj_patel
Shopify Partner
2378 514 511

This is an accepted solution.

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .product-form__input input[type=radio]:checked+label {
      background-color: #000 !important;
      color: #fff !important;
   }
</style>

niraj_patel_0-1725074298081.png

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

View solution in original post

Replies 8 (8)

WalkYourStyle
Explorer
437 53 78

Can you share your store's URL?

momowt
Excursionist
12 0 7

offthecourt.store

WalkYourStyle
Explorer
437 53 78

1. Go to 'Online Store' -> Themes -> Edit Code

2. In the assets folder, locate the file 'section-main-product.css'

3. At the end of the file add this code

 

 

/* Product Variant Selected Disappearing Problem */
.product-form__input input[type=radio]:checked+label{
   background-color: black;
}
.product-form__input input[type=radio]+label {
    border: 1px solid black;
}

 

niraj_patel
Shopify Partner
2378 514 511

Hello @momowt 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .product-form__input--pill input[type=radio]:checked+label {
      background-color: rgb(var(--color-foreground)) !important;
      color: rgb(var(--color-background)) !important;
   }
</style>

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

 

Add this if this code not work then please share your store URL.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
momowt
Excursionist
12 0 7

Hi, thanks for your suggestion but unfortunately it is not working. The url to my store is offthecourt.store

niraj_patel
Shopify Partner
2378 514 511

This is an accepted solution.

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .product-form__input input[type=radio]:checked+label {
      background-color: #000 !important;
      color: #fff !important;
   }
</style>

niraj_patel_0-1725074298081.png

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
momowt
Excursionist
12 0 7

Thank you sir! it works!

 

BSS-TekLabs
Shopify Partner
1842 525 612

- Here is the solution for you @momowt 
- Please follow these steps:

z5686811214059_e66de1953f1db631f9134af5cdb796ad.jpg

- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.

<style>
.product-form__input input[type=radio]:checked+label {
    background: black !important;
}
</style>

- Here is the result you will achieve:

BSSTekLabs_0-1725075248512.png

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution .
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
BSS Commerce - Full-service eCommerce Agency

For give Gift to customers and Upsell in Cart, check out Salepify: Free Gifts with purchase


Post purchase upsell, downsell offers to improve sales and AOV
Salemate Post Purchase Upsell