PRODUCT - Show an stock countdown bar
Stock countdown can be an effective manner to display the limited availability of your product and create scarcity to increase the perceived value of your products. However, as most of this data is fake, we would recommend you to use this feature only on a limited feature of products.
To add such a countdown, follow those following steps:
- Make sure that your variant inventory is tracked (this means that you have explicitly set an inventory quantity). You can learn more on doing by referring to Shopify official documentation: https://help.shopify.com/manual/products/inventory#set-up-inventory-tracking
Open the theme editor, and in the page selector (or for the featured product section if you want to add it on the home page) select "Product page":
Click on the "Product page" section to display the product related settings:
Turn on the "Show inventory quantity" setting:
Then, open the product page within the Shopify admin for which you want to display the stock countdown bar. Add a tag that has the following format: __stock:VALUE. The VALUE needs to be replaced by the value that is considered as the original stock. For instance, if you set a value of 100, and that the inventory of your variant is 50, then the bar will be half filled.
Here is an example of a tag that defines a value of 100:
Here are several frequently asked questions about this feature:
How can I disable the stock countdown bar?
Simply remove the __stock:VALUE tag from the product.
What happen if the stock of my product is negative or superior to the defined reference stock?
If the value is negative, the theme will automatically consider it as a stock of 0. Similarly, if the value is superior to the reference stock, the theme will clamp the bar so that it is entirely filled.
Can I specify a different reference stock per variant?
Unfortunately, Shopify does not currently allow to specify tags per variant. As a consequence, the reference stock will be the same for all the variants within a product. If you need to have a different value per variant, we recommend you to reach a development service such as TaskHusky or a Shopify Expert to develop a custom solution.