Change sold out button and text colour? Refresh Theme

Solved

Change sold out button and text colour? Refresh Theme

gchemuk
Tourist
10 0 1

Hi guys, 

 

I've tried several other solutions for this in this forum and elsewhere online but nothing has worked unfortunately. 

 

I'm trying to change the sold out button and text colour, text to white and the button to red. It would need to be consistent across the homepage "featured collection" and the "product grid". 

 

My website is gchem.co.uk

 

If somebody could help it would be very much appreciated.

 

Alex

Accepted Solutions (2)

Made4uo-Ribe
Shopify Partner
10196 2420 3064

This is an accepted solution.

Hi @gchemuk 

Check this one. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

.card__badge.bottom.left .badge {
    background: red;
    padding: .6rem 1rem;
    color: white;   
}

 

  • And Save. 
  • result:
  • Made4uoRibe_0-1721667020538.png

     

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Made4uo-Ribe
Shopify Partner
10196 2420 3064

This is an accepted solution.

You are talking about the product page? The product page have different code not same on the collections. 

This is for the product page. 

 

span.badge.price__badge-sale.color-background-2 {
 color: white;
 background: red;
 padding: .6rem 1rem;
}
span.badge.price__badge-sold-out.color-background-1 {
  color: black;
  background: blue;
  padding: .6rem 1rem;
}

 

AndSave. 

The sale is background-2 and sold-out is background-1.

Made4uoRibe_1-1721680016010.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 8 (8)

Made4uo-Ribe
Shopify Partner
10196 2420 3064

This is an accepted solution.

Hi @gchemuk 

Check this one. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

.card__badge.bottom.left .badge {
    background: red;
    padding: .6rem 1rem;
    color: white;   
}

 

  • And Save. 
  • result:
  • Made4uoRibe_0-1721667020538.png

     

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
gchemuk
Tourist
10 0 1

Thanks alot!! 

gchemuk
Tourist
10 0 1

Sorry but I've realised that now both the sold out and sale badges are the same. Is there a way of having an individual colour for each? 

Made4uo-Ribe
Shopify Partner
10196 2420 3064

Would you mind to provide the URL/products with sale badge?

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
gchemuk
Tourist
10 0 1

The super sample wash kitt, it's red with **bleep**e text in the shop all section but within the product it's red with blue text. The sold out badge is also still white with blue text within the product pages. 

Made4uo-Ribe
Shopify Partner
10196 2420 3064

PLease, replace the code wit this one. And add your desired color. 

 

/* sold-out badge */
.badge.badge--bottom-left.color-background-1 {
    color: black;
    background: blue;
    padding: .6rem 1rem;
}
/* sale badge */
.badge.badge--bottom-left.color-background-2 {
   color: white;
    background: red;
     padding: .6rem 1rem; 
}

 

And Save,. 

Result:

Made4uoRibe_0-1721679724007.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Made4uo-Ribe
Shopify Partner
10196 2420 3064

This is an accepted solution.

You are talking about the product page? The product page have different code not same on the collections. 

This is for the product page. 

 

span.badge.price__badge-sale.color-background-2 {
 color: white;
 background: red;
 padding: .6rem 1rem;
}
span.badge.price__badge-sold-out.color-background-1 {
  color: black;
  background: blue;
  padding: .6rem 1rem;
}

 

AndSave. 

The sale is background-2 and sold-out is background-1.

Made4uoRibe_1-1721680016010.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
gchemuk
Tourist
10 0 1

Thank you so much! 🙌