Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Product based confirmation mail

How can I customize confirmation emails for specific products?

Palaceleo
Tourist
13 0 0

Hi guys

 

We want to have a different confirmation mail for one of our products. The reason is that we want to add more information for this specific product. 

Here a simple example:

Product A (normal confirmation)

Product B (different confirmation)

 

If our customers buy product B they need additional information an therefore should receive another e mail confirmation. 

 

Is this possible?

 

Thanks for helping!

Best regards

Leo

 

 

Reply 1 (1)

zz3
Tourist
4 0 2

Yes, it's possible to have a different confirmation email for specific products in Shopify. One way to accomplish this is by using Shopify's email triggers and conditional logic to send a different email for certain products.

Here's an overview of the steps you can take:

  1. Create a new email template in the Shopify admin under Settings > Notifications. This email template will be used for Product B.

  2. In your existing order confirmation email template, use conditional logic to check whether Product B is included in the order. You can do this by checking the order's line items and checking the product ID or title of each item.

  3. If Product B is included in the order, use Shopify's email triggers to send the new email template you created in step 1, instead of the default order confirmation template.

{% for line_item in line_items %}
{% if line_item.product.id == 12345 %}
{% assign use_new_email = true %}
{% endif %}
{% endfor %}

{% if use_new_email == true %}
{% capture email %}
{% include 'product-b-confirmation-email' %}
{% endcapture %}
{% include 'email-footer' %}
{% else %}
{% capture email %}
{% include 'order-confirmation-email' %}
{% endcapture %}
{% include 'email-footer' %}
{% endif %}