Show inventory count only when low in stock (Dawn theme)

I added the Inventory Status block to my products but I want it to show inventory status and count only when it reaches the low stock threshold. Currently, it shows “In Stock” but I don’t want customers to see that in order to create urgency.

Hoping not to use an app as I never like the fonts they use!

@cck110925 code needs to be edited to show the count of stock

Hi @cck110925

Are you using Dawn theme? If you are, please open your main-product.liquid file, replace the code below {%- when 'inventory' -%} with this code

<p
                  class="product__inventory{% if block.settings.text_style == 'uppercase' %} caption-with-letter-spacing{% elsif block.settings.text_style == 'subtitle' %} subtitle{% endif %}{% if product.selected_or_first_available_variant.inventory_management != 'shopify' %} visibility-hidden{% endif %}"
                  {{ block.shopify_attributes }}
                  id="Inventory-{{ section.id }}"
                  role="status"
                >
                  {%- if product.selected_or_first_available_variant.inventory_management == 'shopify' -%}
                    {%- if product.selected_or_first_available_variant.inventory_quantity > 0 -%}
                      {%- if product.selected_or_first_available_variant.inventory_quantity
                          <= block.settings.inventory_threshold
                      -%}
                        <span class="svg-wrapper" style="color: rgb(238, 148, 65)">
                          {{- 'icon-inventory-status.svg' | inline_asset_content -}}
                        </span>
                        {%- if block.settings.show_inventory_quantity -%}
                          {{-
                            'products.product.inventory_low_stock_show_count'
                            | t: quantity: product.selected_or_first_available_variant.inventory_quantity
                          -}}
                        {%- else -%}
                          {{- 'products.product.inventory_low_stock' | t -}}
                        {%- endif -%}
                      {%- endif -%}
                    {%- else -%}
                      {%- if product.selected_or_first_available_variant.inventory_policy == 'continue' -%}
                        <span class="svg-wrapper" style="color: rgb(62, 214, 96)">
                          {{- 'icon-inventory-status.svg' | inline_asset_content -}}
                        </span>
                        {{- 'products.product.inventory_out_of_stock_continue_selling' | t -}}
                      {%- else -%}
                        <span class="svg-wrapper" style="color: rgb(200, 200, 200)">
                          {{- 'icon-inventory-status.svg' | inline_asset_content -}}
                        </span>
                        {{- 'products.product.inventory_out_of_stock' | t -}}
                      {%- endif -%}
                    {%- endif -%}
                  {%- endif -%}
                </p>

Then set up the Inventory status block’s settings to make it works

Best Regards,

Dan from Ryviu: Product Reviews App

That worked so well, thank you Dan! Is there a way I can change the color of the text as well if it reaches the low inventory threshold?

You can change this color by adding this code to Custom CSS of Theme Settings

.product__inventory { color: red; }

Change red with your own color code.

Hello my name is Nathan from Axeon,

I actually just released an app that does exactly what you’re describing. With our ScarcityPro+ Qty & Timer, you can:

  • Set a stock threshold, only display the low stock banner when inventory is below your chosen amount.

  • Or, if you prefer, always display a dynamic stock count (even when inventory is high) to keep urgency visible.

  • Filter by product tags or product names → so the banner only shows up on the items you want it to.

  • Full design control → adjust fonts, colors, backgrounds, and even drop in custom CSS so the banner perfectly matches your theme using our generator.

It’s lightweight, theme-compatible, and built specifically for flexibility so you can fine-tune how and when urgency is shown. Check it out and let me know if you have any questions: ScarcityPro+ Quantity & Timer - Axeon ScarcityPro+ Sales Timer and Stock/Quantity Banner App | Shopify App Store