I want to make a certain message appear in my Order Confirmation emails only if the items being bought are not physical items. Does anyone know how to do the coding for this?
Here’s the code reference you can use for notifications: https://help.shopify.com/en/manual/orders/notifications/email-variables
In your case you could do something like this to show a custom message if a non-physical item exists in your order:
{% assign digital_item = false %}
{% for line in line_items %}
{% if line.requires_shipping == false %}
{% assign digital_item = true %}
{% endif %}
{% endfor %}
{% if digital_item %}
Anything in this IF block will show if there is a product in the order that does not require shipping.
{% endif %}