Stock level indicator

Stock level indicator

Start your free trial
Start your free trial

General

Online store speed
Online store speed
Accessibility
Accessibility
Theme updates
Theme updates

Theme styles

Style presets
Style presets
Colors
Colors
Fonts
Fonts
Animation
Animation
Social media
Social media

Header

Announcement bar
Announcement bar
Mobile menu
Mobile menu
Search bar
Search bar

Sections

Products

Product listings
Product listings
Product badges
Product badges
Quick view
Quick view
Quick add
Quick add

Product page

Product template
Product template
Variant chips
Variant chips
Sticky add-to-cart bar
Sticky add-to-cart bar
Sibling product swatches
Sibling product swatches
Product recommendations
Product recommendations

Collection page

Collections template
Collections template
Banner
Banner
Product grid
Product grid
Filters and sorting
Filters and sorting

Cart

Quick cart
Quick cart
Cart page
Cart page
Added-to-cart popup
Added-to-cart popup
Cross sells
Cross sells
Free shipping bar
Free shipping bar
Low inventory warning
Low inventory warning

Pages

Templates
Templates
Home page
Home page
About page
About page
Blogs page
Blogs page
Blog post
Blog post
Collections list
Collections list
Contact page
Contact page
Password page
Password page
Search page
Search page
404 page
404 page

Support

Support policy
Support policy
Shopify vs Theme issues
Shopify vs Theme issues
Store access requests
Store access requests

Stock level indicator

In the Product template, the Stock level indicator displays the relative availability of your product with a dynamic indicator bar that alerts customers when there are limited quantities.

Displaying your stock level can turn limited stock quantities into an advantage by conveying a sense of scarcity to increase conversion and quicker purchases.

The indicator bar visually represents the remaining percentage of your initial stock quantity, turns red when stock is low, and displays three different messages.

Set up stock level indicator

Admin | Before adding a Stock level indicator block, you need to enable the Track quantity option for your product and product variants. See the Shopify guide about how to set up inventory tracking.

Follow the steps below to set up the stock level indicator block, and enter a inventory base quantity and low level threshold.

icon
STEPS

In your theme editor (Customize):

  1. Select a Products template you want to edit.
  2. Click (+) Add block and select Stock level indicator from the Theme Blocks list.
  3. Click on the new Stock level indicator block to open the settings.
  4. (Optional.) Change the Label that displays above the indicator bar.
  5. Enter the initial quantity of your product stock level in the Inventory base quantity field.
  6. The indicator bar displays your remaining product quantity as a percentage of this base quantity. If your base quantity is set at 100 products, the bar will display at 100% when your have 100 products in stock and 60% when you have 60 products in stock.

    To learn how to set different base quantities for multiple products, see the steps below for using dynamic sources and metafields.

  7. Enter the product inventory quantity in the Low quantity threshold to alert customers when limited quantities are available.
  8. When your current product inventory matches or goes below the Low quantity threshold, the indicator bar will turn red and display a "Limited quantities available" message.

    To learn how to set different Low inventory thresholds for multiple products, see the steps below for using dynamic sources and metafields

  9. (Optional.) Click and hold the drag handles ⋮⋮ to rearrange the blocks:
  10. image

    Click Remove block in the block settings to delete a block.

    Click the Eye icon to hide or unhide a block.

  11. Click Save.

Use dynamic sources for multiple products

If you need to set a different Inventory base quantity and Low inventory threshold for multiple products, you can use Shopify's metafields and dynamic sources.

Follow the steps below to create metafields for your products, add inventory numbers to those metafields, then use Dynamic sources to connect metafields to the stock level settings in your theme editor.

For a general introduction, see our Dynamic sources and metafields tutorial.

1. Create number metafield

Shopify's Metafields lets you store additional information about your products. You can create custom fields to hold different types of information in your Shopify admin, and enter unique content for each of your products.

The steps below show you how to add two Number metafields for storing an inventory base quantity and Low stock threshold.

icon
STEPS

In your theme editor (Customize):

  1. Click the Stock Level Indicator block to open the settings.
  2. Next to the Inventory base quantity field, click the Insert dynamic source button and select (+) Add Metafield.
  3. Click the Products tab.
  4. image
  5. Click the Add definition button in the top-right.
  6. Add a Name to the metafield that describes what it will be used for.
  7. We recommend naming the metafield the same as the setting name: "Inventory base quantity" or "Low stock threshold".
    image
  8. Click (+) Select type button and select Number.
  9. (Optional.) Repeat steps 4 - 5 to add another metafield for Low stock threshold.
  10. Click Save.

2. Add quantity to number metafields

Once you've created number Metafields for your products, you can now add quantities those fields by going to your products in the Shopify admin.

icon
STEPS

In your Shopify Admin:

  1. Go to your Product inventory in your Shopify admin and open one of your Products.
  2. image
  3. Scroll down to the Metafields section.
  4. Enter the Inventory base quantity or Low quantity threshold that you want for the product.
  5. image
  6. Repeat steps 1 - 3 to add the different quantities to the metafields of the products you want to display a Stock level indicator.
  7. Click Save.

3. Insert metafields as dynamic sources

Now that the Metafields of your products have content, you can go to the theme editor to insert a Dynamic source to the Stock level indicator settings in the Products template.

icon
STEPS

In your theme editor (Customize):

  1. Click the Stock Level Indicator block to open the settings.
  2. Delete the current quantity in the Inventory base quantity so the field is left blank.
  3. Click the Insert dynamic source button next to Customer product list
  4. image
  5. Select the "Inventory base quantity" metafield you create.
  6. (Optional.) Click the Dynamic source button next to the Low stock threshold to add a "Low stock threshold" metafield.
  7. You can now preview your store to confirm the correct product list appears when viewing different products.
  8. Click Save.