I’m trying to display “In stock” and “Out of stock” on my product page with custom liquid. So when a customer selects a variant inside the product, it checks if the variant is in stock or not, and shows the relevant text. I have tried this, but it doesn’t work, any ideas?
Thanks for the response, but it doesn’t work. ;(
You can still buy if it’s out of stock, so everyone is available. Is there a way so if there is min 1 in stock it says “in stock” and if there is 0 it says “Out of stock”?
The problem might be in the way of implementation. You change your variant without page reload, because it’s dynamic and liquid code is not updated. It should be done with JavaScript, not Liquid.