Dawn theme: How to change product page's inventory amount color and text

Dawn theme: How to change product page's inventory amount color and text

Pelikrypta
Visitor
1 0 1

Hi!

For "continue selling when out of stock" products it shows green light and "in stock" as for those items that are in stock.

 

I would like to differentiate this with different color (orange maybe) and with text "order in advance" or something.

 

How to do this?

 

I have tried Kaktus, but it doesn't work that well. Sometimes it shows pre-order button for product, sometimes it doesn't. Also it does not change that green "in stock" announcement.

Replies 4 (4)

Made4uo-Ribe
Shopify Partner
10036 2386 3012

Hi @Pelikrypta 

 

You can achieve this by following the instructions below. 

 

  1. From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  2. Find the theme that you want to edit and click on "Actions" and then "Edit code".
  3. In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
  4. And Save.
.product__inventory circle {
    fill: orange;
}

.product__inventory {
    color: orange;
}

 

5. Next, under the Section folder, open the "main-product.liquid" file

6. Find the code {{- 'products.product.inventory_out_of_stock' | t -}} and replace it to your text "Order in advance".

 

See image below for reference

Ribe_Dagandara_1-1691176202941.png

 

7. Click SAVE

 

 

Result:

Ribe_Dagandara_0-1691176122801.png

 

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.
Maynestudioco
Visitor
1 0 0

Can you show the what code looks like after replacing it with the text “order in advance”? Thank you

CaseyGrace
New Member
4 0 0

How would I apply this to the grey "out of stock" text on a product page? The admin shows the selection as "inventory status" but I don't see that as an asset. I do see "out of stock" on my sold-furniture template page. Can I actually change this text color? I want to go from grey to a hot pink (vs. red). Oh and can I specify the hex#?  

Elias
Shopify Staff (Retired)
3076 300 550

Hey, @CaseyGrace.

 

Thanks for joining the thread.

 

If you're using a Shopify-supported theme, then changing the colors of the texts is something that our Theme Support team can help you with. While we're unable to provide account-specific support via the Shopify Community, we'd be happy to continue assisting you through live chats. Simply visit the Shopify Help Center and login to your account to create a support request. On the other hand, if you're using a third-party or custom theme, then we'd recommend getting support for your theme from the theme developers. If the theme developers don't offer customization support, then you can also consider hiring a certified developer from Shopify Partners.

 

If you have any other questions on this topic, then don't hesitate to let us know.

Elias | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog