I am looking for a solution to dynamically show a message on my product page, based on a variant stock level.
If I write this using only liquid code, the messages show up correctly when the page is loaded, but then are not dynamically updated after a new variant/option is selected.
Ideally I want to show one of the following messages, based on stock level:
1. in stock --- if stock is more than 10 units
2. out of stock
3. limited --- if stock is between 0 and 10 units
I assume I need to adjusted the theme.js to have the stock being dynamically updated, but my js skills are not that good, yet ;)
I am using the Debut theme.
Would be really thankful for any suggestions or further links to get more info.