I am trying to update the out-of-the-box Order Confirmation email to display a specific message if a customer purchases a digital product only OR a specific message if a customer purchases a digital product and a physical product.
Has anyone added this kind of customization to their Order Confirmation email before and if so, what code did you use?
Hello! Were you ever able to figure this out, i see the post is from awhile ago but I have the exact same question - looking for code to copy & modify. Thanks so much if you’re able to provide!
{% if count_physical_items > 0 and count_physical_items != cart.item_count %}
{% assign has_digital_and_physical_products = true %}
{% endif %}
or probably easier to use:
{% assign has_digital_products = false %}
{% assign has_physical_products = false %}
{% for item in cart.items %}
{% if item.requires_shipping %}
{% assign has_physical_products = true %}
{% else %}
{% assign has_digital_products = true %}
{% endif %}
{% endfor %}
{% if has_digital_products and has_physical_products %}
Your package is on its way! Also look for an email.
{% elsif has_digital_products %}
Check your email!
{% else %}
Your package is on its way!
{% endif %}