How to change a Badge price color?

How to change a Badge price color?

NiceyGin
Tourist
7 0 1

Hello guys, i have this problem: I have to change the color of the badge and the discounted price from RED to this one #b09035 (see attached). please help me.

 

Screenshot 2024-10-18 alle 11.54.19.png

 

Replies 15 (15)

rajweb
Shopify Partner
827 71 157

Hey @NiceyGin ,

Could you share your store URL so I can check?

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Our App: Productify Groups App
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev

Tech_Coding
Shopify Partner
520 133 131

Hello @NiceyGin 


would you like to share your store URL and password if any please.
so i can check and provide you possible solution for your question.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

rajweb
Shopify Partner
827 71 157

To change the color of the badge and the discounted price in your Shopify store, you can do this by editing your theme's CSS

Follow these steps:

1. Online Store > Themes > Edit Code

In the Assets folder, look for a file named theme.scss.liquid, style.scss.liquid, or similar. Open this file

Scroll to the bottom of the CSS file and add the following code:

/* Change badge color */
.badge {
    background-color: #b09035 !important; /* Adjust the badge color */
}

/* Change discounted price color */
.price .discounted {
    color: #b09035 !important; /* Adjust the discounted price color */
}

Note: The specific class names (.badge and  .price.discounted) might vary based on your theme. You can inspect the elements using your browser's developer tools to find the exact class names if needed.

 

If I was able to help you, please don't forget to Like and mark it as the Solution!

Best Regard,

Rajat Sharma

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Our App: Productify Groups App
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev
NiceyGin
Tourist
7 0 1

I don't have any of those files inside the asset folder. The options are:

 

in Layout folder: theme.liquid

in Asset folder: theme-editor.js

in snippets folder: theme-variables.liquid

rajweb
Shopify Partner
827 71 157

@NiceyGin ,

You can still make the color changes using either the  theme.liquid file or the theme.variables.liquid file. Here's how you can do it:

Using theme.liquid

Edit theme.liquid:

Open the theme.liquid  file in the Layout folder.

Scroll to the bottom of the file, just before the closing </head> tag.

Add the following CSS:

<style>
    /* Change badge color */
    .badge {
        background-color: #b09035 !important; /* Adjust the badge color */
    }

    /* Change discounted price color */
    .price .discounted {
        color: #b09035 !important; /* Adjust the discounted price color */
    }
</style>

 

Using theme.variables.liquid

If your theme uses  theme.variables.liquid  for variables, you can add custom CSS there as well:

<style>
    /* Change badge color */
    .badge {
        background-color: #b09035 !important; /* Adjust the badge color */
    }

    /* Change discounted price color */
    .price .discounted {
        color: #b09035 !important; /* Adjust the discounted price color */
    }
</style>

If the class names .badge  and  .price .discounted do not work, you may need to inspect the elements on your store to find the correct classes or IDs associated with the badge and discounted price. If you need help with that, let me know!

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Our App: Productify Groups App
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev
NiceyGin
Tourist
7 0 1

It doesn't work 😞

rajweb
Shopify Partner
827 71 157

 Could you please send me a message via email so we can discuss this further?

Thanks

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Our App: Productify Groups App
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev

DaviesYoung
Shopify Partner
12 4 6

You could give this a try,
Default product > Product information > Custom CSS:

 

.price-item--sale {
  color: #b09035;
}
.price__badge-sale {
  background-color: #b09035;
}

 

My two cents. Good luck.

Davies&Young — Graphic Banners for your Shopify Store. Easy to Customize.

Rahul_dhiman
Shopify Partner
855 168 186

Hello @NiceyGin 

Go to online store ----> themes ----> actions ----> edit code ----> assets ---->component-price.css
add this code at the end of the file.

span.badge.price__badge-sale.sale {
background: #b09035 !important;
}
span.price-item.price-item--sale.price-item--last {
color: #b09035 !important;
}

result
7.png

If this was helpful, hit the like button and accept the solution.
Thanks

Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront

Contact here


BEST CUSTOMER ACCOUNTS APP WITH CUSTOM WISHLIST OPTION 
TRY OUR APP :

PWC: Customer Accounts & Pages

NiceyGin
Tourist
7 0 1

Almost done.... It has changed only the badge 🤦🏻‍♂️

 

Screenshot 2024-10-18 alle 12.16.35.png

ZestardTech
Shopify Partner
6148 1100 1477

Hello @NiceyGin 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the top of the file:

 

.badge.price__badge-sale.color-accent-2 {
background-color: #b09035;
color: #fff;
}
Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
NiceyGin
Tourist
7 0 1

It doesn't work

Rahul_dhiman
Shopify Partner
855 168 186

Try this code
Go to online store ----> themes ----> actions ----> edit code ----> assets ---->component-price.css
add this code at the end of the file.

span.badge.price__badge-sale.sale {
background: #b09035 !important;
}
.price-item--sale {
color: #b09035 !important;
}

thanks

Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront

Contact here


BEST CUSTOMER ACCOUNTS APP WITH CUSTOM WISHLIST OPTION 
TRY OUR APP :

PWC: Customer Accounts & Pages

Amanda_Fordeer
Shopify Partner
176 10 33

Hi @NiceyGin, You can change the price and badge color using Product Labels & Badges. Check out the example below.

 

Amanda_Fordeer_0-1729506352358.png

Amanda_Fordeer_1-1729506722042.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.