Stock availability notification

Topic summary

Goal: Add a “Note: only 7 units left in stock” message above the Add to Cart button, with a slowly flashing red dot, even though actual inventory is 200.

Proposed approaches:

  • Theme setting: Use the default Shopify theme’s “Inventory status” block placed above the Buy buttons and set the Low inventory threshold to 7. An image was provided showing where to configure this option.
  • Custom code: Insert a small HTML snippet in the product template near the Add to Cart button to display the text, then use CSS for styling (red dot, bold “7”) and JavaScript for the flashing/dynamic behavior.

Notes:

  • The theme-based method relies on Shopify’s inventory settings and low inventory threshold to display a warning when stock is low.
  • The custom-code method allows fixed messaging and visual effects regardless of actual inventory.

Status: No confirmation from the original poster on implementation or preference. The discussion remains open with two viable paths: built-in theme block or custom HTML/CSS/JS.

Summarized with AI on December 25. AI used: gpt-5.

hee, i had a quistion for a shopify coding expert, how do i add a Stock availability notification above my add to cart section, i want it to show that i only have 7 units left but in reality i have 200 left, and that the red dot before the text is flashing slowely.

This is the exact text i want “•Note: (<- in red and the dot flasing) only 7 units left in stock”

tnx for your help

Hi @Maxim_5

The default Shopify theme has an option named is Inventory status, please add it above your Buy buttons block and set Low inventory threshold value is 7

Hi,

Hope this will help

At Product Template (find the section where the “Add to Cart” button is located) and add the code


  
  • Note: • Only 7 units left in stock

Use css for style and use javascript for more dynamic behavior