Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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
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:
Create a new email template in the Shopify admin under Settings > Notifications. This email template will be used for Product B.
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.
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 %}
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024