Skip to main content

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.

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: 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. If you remove that variable entirely, the badge instead shows a fixed manual message instead of the live count.

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.

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.

- Don't delete the {live_stock_count} token unless you intentionally want a fixed, non-live message.

- 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?

The "Stock less than" threshold you set, compared against Shopify's live inventory count for that product or variant.

Can I write a fixed message instead of showing the live count?

Yes, remove the {live_stock_count} token from the alert text entirely and it becomes a static message instead of a live one.

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.

Did this answer your question?