# Adding a Low Stock Notifier on my Product Page.

**URL:** <https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [June 8, 2021, 9:17am UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928 "2021-06-08T09:17:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kustomfigz](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kustomfigz](https://forum.wixstudio.com/u/kustomfigz)\
**Post date:** [June 8, 2021, 9:17am UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928/1 "2021-06-08T09:17:59Z")

</div>

Hi im looking to add a Low in Stock when an item hits 2 units. Ive seen the code but i have no experience in coding, i wondered if anyone would be able to help me.

---

<div class="post-metadata">

**Author:** ![Certified\_Code](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/certified_code/32/80179_2.png) [@Certified\_Code](https://forum.wixstudio.com/u/Certified_Code)\
**Post date:** [June 8, 2021, 9:23am UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928/2 "2021-06-08T09:23:25Z")

</div>

Hi @kustomfigz , you can learn Velo with these resources: [https://www.wix.com/velo/forum/getting-started/resources-to-learn-velo](https://www.wix.com/velo/forum/getting-started/resources-to-learn-velo)

the original code is:

```javascript
import wixLocation from 'wix-location';

$w.onReady(function () {

    trackProductInventory();

    wixLocation.onChange(() => {
        trackProductInventory();
    })
});

async function trackProductInventory() {
    const product = await $w('#productPage').getProduct();
    const productQuantity = product.quantityInStock;

    if (product.inStock && productQuantity <= 10) {
        $w('#stockNotification').show();
    } else {
        $w('#stockNotification').hide();
    }
}

```

You can change this line from

```javascript
    if (product.inStock && productQuantity <= 10) {

```

to

```javascript
    if (product.inStock && productQuantity <= 2) {

```

So the case will be equal to or less than 2 stock unit.

P.S. Please do not directly copy the code as it may not work as expected. You can advise doing some modification based on your needs. - This forum is for learning, there won’t be any do-it-for-you-for-free services 🙂

---

<div class="post-metadata">

**Author:** ![kustomfigz](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kustomfigz](https://forum.wixstudio.com/u/kustomfigz)\
**Post date:** [June 8, 2021, 9:26am UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928/3 "2021-06-08T09:26:34Z")

</div>

Thank you for your quick response, yeah i understand that i need to do it myself : ) just hard when had no experience. But thank you so much

---

<div class="post-metadata">

**Author:** ![Certified\_Code](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/certified_code/32/80179_2.png) [@Certified\_Code](https://forum.wixstudio.com/u/Certified_Code)\
**Post date:** [June 8, 2021, 9:28am UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928/4 "2021-06-08T09:28:09Z")

</div>

Hope you can find some success with Velo!

Btw,  
If you are having difficulty with the code, you might want to consider looking for help on the [Wix Marketplace](https://www.wix.com/marketplace/dynamic-brief?entry=general_corvid_Menu&serviceType=1&innerType=1&origin=velo_forum_networking) , an online marketplace with top Velo web developers from around the world.

---

<div class="post-metadata">

**Author:** ![Yose](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yose/32/117331_2.png) [@Yose](https://forum.wixstudio.com/u/Yose)\
**Post date:** [July 6, 2026, 9:51pm UTC](https://forum.wixstudio.com/t/adding-a-low-stock-notifier-on-my-product-page/40928/5 "2026-07-06T21:51:28Z")

</div>

This post is a few years old, so there are a couple more options now for anyone else looking at this.

**1. Use Velo (like above).**  
The Velo solution above should still work.

**2. Use Wix’s built-in Low Stock message. (These steps are for Wix Studio, but they should be very similar in Wix Editor and Harmony.)**  
Wix has a built-in low stock indicator that appears below the quantity selector on the product page. By default it is enabled and shows when inventory drops below 10 items. It isn’t very obvious how to customize it in the editor, but here’s how:

1. Go to your wix editor → go to your Product Page → Change the product you’re viewing to one that is “low” (“low” defaults to less than 10 if you haven’t changed it)

2. In **Settings** , make sure **Stock status** is checked.

3. Click the **“Only X left in stock”** element to customize its design and change the inventory threshold that Wix considers “low”.

 ![Screenshot 2026-07-06 at 5.21.11 PM](https://us1.discourse-cdn.com/wix/original/3X/0/f/0fe062450876a567a9e4b1a2904eb62c6bf6f0d7.png)

Note: This only appears on the Product Page and applies to all products by default. As far as I know, you can’t customize the text template (“Only X left in stock”), only the threshold and styling.

**3. Use a third party app**  
If you want more flexibility, you can also use a third-party app. I built **[Better Product Labels](https://www.wix.com/app-market/powerup-product-labels)**, which automatically displays custom ribbons based on inventory rules (and other rules). For example, you can show “ **Low Stock** ”, “ **Only 3 Left** ”, “ **Selling Fast** ”, or any custom text on the Home page, Category page, and Product page, not just below the quantity selector.
