Dear all,
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 they are not dynamically updated after a new variant/option is selected. So I guess I need some more code to get the page updated like when the price changes when a variant is selected. Now it only works when manually refreshing the page after a variant selection.
Ideally I want to show one of the following messages, based on stock level:
-
in stock — if stock is more than 10 units
-
out of stock
-
limited — if stock is between 0 and 10 units
I’m using the Empire theme.
Would be really thankful for any suggestions or further links to get more info.
Kind regards,
Jonas