Would like to ask about how to add a real-time ticker for stock availability next to the price of a product on the thumbnails and the actual product page. Please ask and see attachments.
I actually came across a problem with this code and did not notice it until now, the ticker still displays “1 in stock” even when the “add to cart” button displays “out of stock”, is there a fix to this?
If you would like to use an app for this purpose, you can check out this app. It is exactly providing what you asked for. Displays remaining/left in stock just above the add-to-cart button and works for variant level. The threshold can be also selected within the app so that you can only display the widget if you are low in stock.