> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/swatch/appearance/sale-badge-and-in-stock-message.md).

# Sale badge and in-stock message

Flag discounted variants and show how many are left.

Two product-page extras live at the bottom of most style editors. Both are off until you switch them on.

## Sale badge

Marks any option value whose variant is currently discounted.

1. Go to **Appearance → Product page** and **Customize** the style.
2. Open **Sale badge** and turn its toggle on.
3. Choose **Badge content**:
   * **Text** — shows the wording you set in **Sale badge text** (default `SALE`).
   * **Percentage** — shows the discount worked out from the variant's compare-at price.
4. Set **Badge background color** and **Badge text color**.
5. Click **Save**.

<figure><img src="https://3138853960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDsbeTbRNMPUo58YEXkMj%2Fuploads%2Fgit-blob-60e253b34e8595bebecb98baee4d8ff2fedc42da%2Fimage%20(48).png?alt=media" alt=""><figcaption></figcaption></figure>

Note: The Sale badge group turned on, with Badge content set to PercentageThe badge only appears where Shopify has **a compare-at price higher than the selling price**, so it follows your sales automatically — nothing to switch off when a promotion ends.

{% hint style="info" %}
This is different from [Custom badges](/swatch/options/custom-badges.md), which you write yourself and pin to particular values.
{% endhint %}

## In stock message

Shows the remaining quantity of the selected variant, to nudge shoppers on low stock.

1. In the same editor, open **In stock message** (called **In stock product message** on some styles) and turn its toggle on.
2. Edit **Content**. Use `{number}` where the quantity should go — the default is `Stock: only {number} left in stock`.
3. Click **Save**.

`{number}` is the only variable, and it's replaced with the stock level of whichever variant is selected.

<figure><img src="https://3138853960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDsbeTbRNMPUo58YEXkMj%2Fuploads%2Fgit-blob-308ef636c74d930fbde3cf1b293491485ae14246%2Fimage%20(49).png?alt=media" alt=""><figcaption><p><br>The <strong>In stock message</strong> group with the <strong>Content</strong> field</p></figcaption></figure>

{% hint style="info" %}
The in-stock message is a product-page feature. It doesn't appear on collection pages.
{% endhint %}

Some wordings that work well: `Only {number} left`, `Hurry — {number} in stock`, `{number} available`.

## Related pages

* [Customize a swatch style](/swatch/appearance/customize-a-swatch-style.md)
* [Out-of-stock styles](/swatch/appearance/out-of-stock-styles.md)
