Custom Order Confirmation Email

Hi there,

I want to create a custom order confirmation for only 2 of my products listed on my store. Is there anyway this is possible?

Thank you

Hi LoveLend,

You can edit the code in Settings > Notifications > Order confirmation > Click “Edit code”.

I did the example code for you. Let’s name the product “custom-product”. Replace the code before {% capture email_body %} by below code:

{% assign custom-product = false %}
{% for line in subtotal_line_items %}
{% if line.product.title contains ‘custom-product’ %}
{% assign custom-product = true %}
{% endif %}
{% endfor %}

{% if custom-product == true %}
{% capture email_title %}
{% if has_pending_payment %}
Thank you for your CUSTOM order!
{% else %}
Thank you for your CUSTOM purchase!
{% endif %}
{% endcapture %}
{% else %}
{% capture email_title %}
{% if has_pending_payment %}
Thank you for your order!
{% else %}
Thank you for your purchase!
{% endif %}
{% endcapture %}
{% endif %}

You can test it by create a product called “custom-product” and create an order to test. You can see the email title now changed to the custom-product. I did it before and it worked. You can change the body as well by setting the condition.

1 Like