Low Stock Badge Widget
Show a live scarcity alert on the product page once inventory drops below a threshold, pulling the real, current stock count from Shopify.
Updated November 1, 2026
The Stock badge widget shows a live scarcity alert on the product page once inventory drops below a threshold you set, pulling the real, current stock count from Shopify. It works across all campaign types.
WHERE TO FIND IT
Go to Widgets in your Discount Prime admin, then open the Stock badge card.
WHAT YOU CAN CONFIGURE
Display
- Display widget on store: master on/off switch
Placement
- Position: show the badge below or above the price
Content
- Stock less than (default 5): the inventory threshold, e.g. 5 triggers the badge once stock is under 5 units
- Alert text (default "🔥 Only {live_stock_count} in stock"): the badge's message
Use the {live_stock_count} variable anywhere in the alert text; it's replaced with the product's actual live inventory count. You can word the text without the number, but the badge still only appears when the variant's live stock is under your threshold.
Advanced stock rules (off by default)
- Minimum stock to show the badge (default 1): the badge is hidden when stock is below this number. With 1, sold-out (0) and oversold (negative) variants never show a "Only 0 in stock" badge. It must be 0 or more and lower than "Stock less than".
Style
- Text color: color of the badge text
- Background color: background behind the badge
A live preview shows the badge placement and styling on a mock product page.
MULTI-LANGUAGE SUPPORT
If your store publishes more than one language in Shopify (Settings -> Languages), a Language dropdown appears above the Alert text field.
- Hidden when your store only publishes one language.
- Keep the {live_stock_count} token exactly as-is in every translation, the storefront looks for that exact placeholder to insert the live count.
- Untranslated text falls back to your default language's alert text on the storefront.
STEP-BY-STEP: CONFIGURE THE WIDGET
1. Go to Widgets -> Stock badge.
2. Toggle "Display widget on store" ON.
3. Choose the Position (below or above price).
4. Set the Stock less than threshold (and, optionally, the Minimum stock to show the badge under Advanced stock rules).
5. Write the Alert text, keeping {live_stock_count} in it (and translate it per language, if applicable).
6. Set the Text color and Background color.
7. Check the preview, then click Save.
STEP-BY-STEP: VERIFY IT WORKS
1. Pick a product with live inventory below your configured threshold.
2. In an Incognito tab, open that product's page and confirm the badge appears with the correct live stock number.
3. Open a product with inventory above the threshold and confirm the badge doesn't appear.
TIPS & COMMON MISTAKES
- Requires the app embed to be active, same as every other Discount Prime widget.
- Keep the {live_stock_count} token if you want shoppers to see the exact number. Removing it doesn't turn the badge into an always-on message; it still follows live inventory.
- Stock updates rely on Shopify's inventory data, if inventory tracking is off for a product/variant, the badge has nothing accurate to show.
MINI FAQ
What decides when the badge shows?
What decides when the badge shows?
The "Stock less than" threshold you set, compared against Shopify's live inventory count for the selected variant. If you turned on Advanced stock rules, stock must also be at least the "Minimum stock to show the badge" value. The badge updates when the shopper switches variants.
Can I show a fixed message instead of the live count?
Can I show a fixed message instead of the live count?
You can write the text without the {live_stock_count} token (for example "🔥 Selling fast"), but the badge is always driven by live inventory: it only shows on variants whose stock is under your threshold. There is no always-on manual scarcity badge.
Does this work on products without inventory tracking enabled?
Does this work on products without inventory tracking enabled?
No, if inventory tracking is off for a variant, there's no live count for the badge to pull from.



