Show color swatch on collection page instead of text

Solved
blakelyhi
Excursionist
61 0 3

Hi, using Stiletto Theme and I want to show the circle product swatches as default instead of the word "3 colors", currently the circle swatches only appear on hover and I'd like for them to appear immediately and remove the text above it for all products..

URL: https://afca7f-2.myshopify.com/

 

Screenshot 2023-11-12 at 6.33.09 AM.png

Accepted Solutions (2)
fadi_yousif
Shopify Partner
311 39 52

This is an accepted solution.

To show the color swatches at all times, navigate to assets --> theme.css and remove opacity: 0; on line 9616.

 

To remove the text, you need to find and delete the <h5> element with a class of product-item__swatch-count. Another option would be to hide the element by adding the following code to the end of theme.css:

h5.ff-body.fs-body-50.product-item__swatch-count {
    display: none;
}

If the above doesn't work, try this:

h5.ff-body.fs-body-50.product-item__swatch-count {
    display: none !important;
}

 

Freelance Shopify Developer | Helping Shopify merchants grow with high-converting online stores!
 - Did I help? Leave a tip!
 - Need my help? Chat on Telegram or WhatsApp
 - Was your question answered? Mark it as an Accepted Solution

View solution in original post

makkaomakka
Shopify Partner
880 172 183

This is an accepted solution.

Hi @blakelyhi ,

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code just above </body> tag

<style>
.product-item__variant-info, .product-item__variant-info{
    opacity: 1!important;
}
</style>

 

If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

❤️❤️

Buy me a coffee


For quick response - Message Me


Increase Xmas sales with BOGO+ Easy Free Gift Upsell. Get 30% OFF for 3 months with code "BFWIZZ30".

View solution in original post

Replies 4 (4)
fadi_yousif
Shopify Partner
311 39 52

This is an accepted solution.

To show the color swatches at all times, navigate to assets --> theme.css and remove opacity: 0; on line 9616.

 

To remove the text, you need to find and delete the <h5> element with a class of product-item__swatch-count. Another option would be to hide the element by adding the following code to the end of theme.css:

h5.ff-body.fs-body-50.product-item__swatch-count {
    display: none;
}

If the above doesn't work, try this:

h5.ff-body.fs-body-50.product-item__swatch-count {
    display: none !important;
}

 

Freelance Shopify Developer | Helping Shopify merchants grow with high-converting online stores!
 - Did I help? Leave a tip!
 - Need my help? Chat on Telegram or WhatsApp
 - Was your question answered? Mark it as an Accepted Solution

blakelyhi
Excursionist
61 0 3

Thank you, the code worked beautifully but I'm not sure I'm locating the right line of code to remove the opacity... my 9616 line doesn't show anything like that. Would it be my line 9611? Attaching an image. 

 

Screenshot 2023-11-12 at 8.52.32 AM.png

fadi_yousif
Shopify Partner
311 39 52

Yes, line 9611 in your case! It was listed at 9616 in my browser.

Freelance Shopify Developer | Helping Shopify merchants grow with high-converting online stores!
 - Did I help? Leave a tip!
 - Need my help? Chat on Telegram or WhatsApp
 - Was your question answered? Mark it as an Accepted Solution

makkaomakka
Shopify Partner
880 172 183

This is an accepted solution.

Hi @blakelyhi ,

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code just above </body> tag

<style>
.product-item__variant-info, .product-item__variant-info{
    opacity: 1!important;
}
</style>

 

If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

❤️❤️

Buy me a coffee


For quick response - Message Me


Increase Xmas sales with BOGO+ Easy Free Gift Upsell. Get 30% OFF for 3 months with code "BFWIZZ30".