I have a customised product.liquid template that includes two products in one template, namely: Bikini Top and Bikini Bottom.
The Bikini Bottom is "externally loaded" into the template using its own cart permalink. My question is, when using cart permalinks, how do I check whether the variant is in-stock or sold out and then display a "sold out" notice if needed?
[EDIT] Below is my cart permalink code for reference:
<form action="/cart/add" method="post" class="variantsform">
<label>Select size</label>
<select name="id">
<option value="1189203320">Small</option>
<option value="1189202416">Medium</option>
<option value="1189200892">Large</option>
<option value="1189203928">Extra Large</option>
</select>
<input type="hidden" name="return_to" value="back" />
<input type="submit" value="Add to cart" class="btn variantsadd">
</form>