Dear All,
I’m using the minimal theme and trying to setup the button to display backorder when the inventory is zero. I’ve changed the setting so that I can still sell the product if there’s no stock, then I added the below code to theme.liquid:
addToCart: {% if current_variant.inventory_quantity > 0 %}
‘ADD TO CART’
{% else %}
‘BACKORDER’
{% endif %},
However, it has changed all the Add To Cart buttons to BACKORDER whether the product inventory has stock or not. Would someone be so kind as to point me to the right direction to fix this please? I’ve searched far and wide on the Internet and in this forum, but cannot find an answer. Further to the above, I’ve also tried replacing current_variant.inventory_quantity to variant.inventory_quantity and still no luck. Please help.