Hello,
I am trying to set up a custom order confirmation email template for when the item is sold with “Continue selling when out of stock” enabled. Basically to include in the confirmation email that the item purchased is PRE-ORDER.
I tried editing order confirmation template adding this code that I found online:
{% for line_item in line_items %}
{% if line_item.variant.inventory_quantity == 0 %}
<p>Your item is Pre-Order since it's sold out.</p>
{% break %}
{% endif %}
{% endfor %}
But sadly this code doesn’t work. I can see the custom message if I preview the email in the template editor but when I actually try to test buy an item that has 0 stock on hand then the confirmation email doen’t have the Pre-Order line.
Any help is appreciated,
Thank you!