Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Differentiate "Sold Out" and "Sale" badge color DAWN

Solved

Differentiate "Sold Out" and "Sale" badge color DAWN

Mortskaa
New Member
4 0 0

Hi, I want to have different colors on the "On Sale" badge from what I have on "Sold Out". I have found many working solutions on how to change them both at the same time with CSS but non where it's possible to give them different colors. I have added a screenshot where "På salg" equals "On Sale" and "Utsolgt" equals "Sold Out".

 

Screenshot 2024-11-08 104912.png

 

I currently have this on the bottom of the CSS file.

 

.badge {
background-color: red !important;
border-color: red !important;
color: white !important;
}

 

Does anyone know how?

Accepted Solution (1)

Amanda_Fordeer
Shopify Partner
156 10 32

This is an accepted solution.

Hi @Mortskaa,

During the Black Friday sale season, you should consider finding an optimized solution for this problem. If you're unable to adjust the colors using code, it's advisable to utilize an app.

 

For instance, with Fordeer: Product Labels & Badges, you can easily create two campaigns (labels), one for items marked as "On Sale" and another for items marked as "Sold Out", and use:

 

1. Discount range to automatically display the label on "On Sale" products.

Amanda_Fordeer_0-1731321303208.png

 

2. Inventory status (Out stock) for the "Sold Out" label.

Amanda_Fordeer_1-1731321438649.png

If you find my suggestion helpful, please give it a like or mark it as a solution!
And discover more approaches to:
Streamline invoicing process Boost sales with labels & badges Add social proofs & create FOMO
Or get valuable updates and private deals regarding Shopify here.

View solution in original post

Replies 6 (6)

Moeed
Shopify Partner
6326 1715 2068

Hey @Mortskaa 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Mortskaa
New Member
4 0 0
Moeed
Shopify Partner
6326 1715 2068

Hey @Mortskaa 

 

Can you remove the current code so that I can help you out?

 

Best Reagrds,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


EvinceDev
Shopify Partner
121 13 13

Hello @Mortskaa , Add class "badge-on-sale" for "on sale" and "badge-sold-out" for "sold out" below added css for badge different colors.

.badge-on-sale {
  background-color: #28a745 !important; /* Bright Green */
  border-color: #28a745 !important;
  color: white !important;
}

/* "Sold Out" Badge - Gray */
.badge-sold-out {
  background-color: #808080 !important; /* Dark Gray */
  border-color: #808080 !important;
  color: white !important;
}

 

Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing
Mortskaa
New Member
4 0 0

How can I get in touch with you?

We need a Shopify developer we can use for stuff like this, build widgets and so on going forward.

Amanda_Fordeer
Shopify Partner
156 10 32

This is an accepted solution.

Hi @Mortskaa,

During the Black Friday sale season, you should consider finding an optimized solution for this problem. If you're unable to adjust the colors using code, it's advisable to utilize an app.

 

For instance, with Fordeer: Product Labels & Badges, you can easily create two campaigns (labels), one for items marked as "On Sale" and another for items marked as "Sold Out", and use:

 

1. Discount range to automatically display the label on "On Sale" products.

Amanda_Fordeer_0-1731321303208.png

 

2. Inventory status (Out stock) for the "Sold Out" label.

Amanda_Fordeer_1-1731321438649.png

If you find my suggestion helpful, please give it a like or mark it as a solution!
And discover more approaches to:
Streamline invoicing process Boost sales with labels & badges Add social proofs & create FOMO
Or get valuable updates and private deals regarding Shopify here.