Fluorescent
Stiletto
Stiletto
  • Stiletto Help Center
    • Start using Stiletto
      • Theme licenses
      • Migrate your theme
    • FAQs
    • Video tutorials
    • Changelog
  • General
    • Editing themes
      • Adding sections
      • Using templates
      • Accessibility
      • Customizing your site
      • SEO for Shopify themes
      • H1 heading tags
      • Online store speed
    • Image guide
      • Web ready photography
      • Image sizes
      • File formats
      • Theme image settings
    • Adapting theme content
      • Edit default theme content
      • Multiple languages
      • Dynamic content with metafields
      • Unique content for markets
    • Update your theme
  • Theme styles
    • Theme settings
    • Style presets
      • Demo layouts
    • Fonts
    • Colors
    • Animation
  • Pages
    • Templates
      • About page
      • Blog page
      • Blog posts
      • Collections list
      • Contact page
      • Customer accounts
      • FAQ page
      • Lookbook
      • Password page
      • Search page
      • Store locations
      • 404 page
      • Home page
    • Announcement bar
    • Header
      • Layout and style
      • Logo
      • Transparent header
      • Mega menus
      • Mobile menu
      • Quick search
      • Language and currency
      • Social media icons
      • Customer account icon
    • Footer
      • Links block
      • Newsletter block
      • Text and image block
      • Language and currency
      • Payment icons
      • Custom Liquid
  • Sections
    • Theme sections
      • Using sections
      • Content blocks
      • Blog posts
      • Collapsible row list
      • Collection list grid
      • Collection list slider
      • Complete the look
      • Contact form
      • Countdown banner
      • Countdown bar
      • Events
      • Featured collection grid
      • Featured collection slider
      • Featured product
      • Gallery carousel
      • Grid
      • Image compare
      • Image hero
      • Image hero split
      • Image with text
      • Image with text split
      • Multi column
      • Newsletter
      • Newsletter compact
      • Promotion banner
      • Promotion bar
      • Quotes
      • Recently viewed products
      • Rich text
      • Sales banner
      • Scrolling content
      • Shoppable image
      • Shoppable image editorial
      • Slideshow
      • Testimonials
      • Video
      • Video hero
      • Video with text
    • Popups
      • Sign up popup
      • Age verification
      • Countdown popup
      • Promotional popup
  • Products
    • Product listings
      • Product card style
    • Prices and discounts
    • Product badges
    • Quick shop
  • Product pages
    • Product template
      • Alternate templates
      • Pre-order template
      • Gift card
    • Layout and style
      • Product tabs
      • Media gallery
      • Sticky product details
      • Breadcrumbs
      • Navigation buttons
    • Overview blocks
      • Default blocks
        • Description
        • Product header
        • Variant selector
        • Quantity selector
        • Buy buttons
        • Local pickup banner
        • Share icons
        • Sticky add-to-cart bar
      • Collapsible rows block
      • Complementary products
      • Custom options
      • Image block
      • Information popup
      • Product labels
      • Secure payment
      • Stock level indicator
      • Text block
      • Text list with icons
      • App blocks
    • Variant options
      • Variant chips
      • Variant swatches
        • Enable swatches
        • Use default colors
        • Use custom colors
        • Use variant images
        • Use custom images
        • Change swatch styles
        • Show on product cards
        • Dynamic option availability
      • Media grouping
      • Sibling product swatches
    • Product page sections
      • Product reviews
      • Product recommendations
  • Collection pages
    • Collection template
      • Collection landing
      • Sale collection
      • Subcollections
      • Flash sale
    • Banner
    • Product grid
    • Filters and sorting
  • Cart
    • Cart page
    • Quick cart
      • Added to cart popup
      • Empty cart promotion
    • Free shipping bar
    • Low inventory warning
    • Cross sells
  • Support
    • Support policy
    • Shopify vs Theme issues
    • Store access requests
  • For developers
    • Custom CSS
    • Custom fonts
    • Custom Liquid
    • Custom JavaScript events
    • Edit Theme JavaScript
Powered by GitBook
On this page
  • Set up stock level indicator
  • Use dynamic sources for multiple products
  • 1. Create number metafield
  • 2. Add quantity to number metafields
  • 3. Insert metafields as dynamic sources

Was this helpful?

  1. Product pages
  2. Overview blocks

Stock level indicator

Last updated 3 months ago

Was this helpful?

The Stock level indicator displays the relative availability of your product with a visual bar that alerts customers when there are limited quantities.

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


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 .

Under Product overview, click (+) Add block and select Stock level indicator. Use the drag-and-drop handles ⋮⋮ to re-order blocks.

  • Enter an inventory base quantity for your product

  • Enter a low level threshold for when the low-stock alert should appear

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.) Toggle the Show label option to display or hide the "Stock" title above the indicator bar.

  5. Enter the initial quantity of your product stock level in the Inventory base quantity field.

    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 .

  6. Enter the product inventory quantity in the Low quantity threshold to alert customers when limited quantities are available.

    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 .

  7. (Optional.) Click and hold the drag handles ⋮⋮ to rearrange the blocks:

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

    Click the Eye icon to hide or unhide a block.

  8. 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 .

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.

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. Click the Add definition button in the top-right.

  5. Add a Name to the metafield that describes what it will be used for.

    We recommend naming the metafield the same as the setting name: "Inventory base quantity" or "Low stock threshold".

  6. Click (+) Select type button and select Number.

  7. (Optional.) Repeat steps 4 - 5 to add another metafield for Low stock threshold.

  8. 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.

STEPS

In your Shopify Admin:

  1. Go to your Product inventory in your Shopify admin and open one of your Products.

  2. Scroll down to the Metafields section.

  3. Enter the Inventory base quantity or Low quantity threshold that you want for the product.

  4. Repeat steps 1 - 3 to add the different quantities to the metafields of the products you want to display a Stock level indicator.

  5. 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.

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. Select the "Inventory base quantity" metafield you create.

  5. (Optional.) Click the Dynamic source button next to the Low stock threshold to add a "Low stock threshold" metafield.

  6. You can now preview your store to confirm the correct product list appears when viewing different products.

  7. Click Save.


Related links

Product template
Metafields and dynamic sources
set up inventory tracking ↗
Dynamic sources and metafields tutorial
steps for using dynamic sources and metafields
steps below for using dynamic sources and metafields