Display message in confirmation email for specific product purchase

Hello,

One specific product we sell requires special instructions in the order confirmation email.

I’m attempting to combine random bits of code I scraped together through the previous threads but can’t get it working. Can anyone help me?

{% capture email_title %}Thank you for reserving a spot for 901 Academy! {% endcapture %}
{% assign bctv_new = false %}
{% for line in subtotal_line_items %}

    {% if line.product.title contains "901 Academy X BCTV Bundle" %}
        {% assign bctv_new = true %}
    {% endif %}

{% endfor %}
{% capture email_body %}
  {% if requires_shipping %}
  {% case delivery_method %}
      {% when 'pick-up' %}
        You’ll receive an email when your order is ready for pickup.
      {% when 'local' %}
        Hi {{ customer.first_name }}, we're getting your order ready for delivery.
      {% else %}
        Hi {{ customer.first_name }}, We've received your 901 Academy reservation. Please bring a government issued ID and your reservation number with you to class.
    {% endcase %}
      {% if delivery_instructions != blank  %}
        

**Delivery information:** {{ delivery_instructions }}

      {% endif %}
      {% if bctv_new %}
    

BCTV TEST MESSAGE HERE

      {% endif %}
  {% endif %}
{% endcapture %}
1 Like

@901Academy213

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

https://901academy.com/
Thank you in advance!

1 Like

@901Academy213

can you try this code

{% capture email_title %}Thank you for reserving a spot for 901 Academy! {% endcapture %}
{% assign bctv_new = false %}
{% for line in subtotal_line_items %}

    {% if line.product.title contains "901-academy-x-bctv-bundle" %}
        {% assign bctv_new = true %}
    {% endif %}

{% endfor %}
{% capture email_body %}
  {% if requires_shipping %}
  {% case delivery_method %}
      {% when 'pick-up' %}
        You’ll receive an email when your order is ready for pickup.
      {% when 'local' %}
        Hi {{ customer.first_name }}, we're getting your order ready for delivery.
      {% else %}
        Hi {{ customer.first_name }}, We've received your 901 Academy reservation. Please bring a government issued ID and your reservation number with you to class.
    {% endcase %}
      {% if delivery_instructions != blank  %}
        

**Delivery information:** {{ delivery_instructions }}

      {% endif %}
      {% if bctv_new %}
    

BCTV TEST MESSAGE HERE

      {% endif %}
  {% endif %}
{% endcapture %}

Thank you for the update.

Unfortunately it’s still not working.

One thing to note is that I just noticed this portion doesn’t show up in the email either

" We’ve received your 901 Academy reservation. Please bring a government issued ID and your reservation number with you to class."

The product is not physical so no delivery methods are set. Might this cause an issue?

{% capture email_title %}Thank you for reserving a spot for 901 Academy! {% endcapture %}
{% assign bctv_new = false %}
{% for line in subtotal_line_items %}

    {% if line.product.title contains "901-academy-x-bctv-bundle" %}
        {% assign bctv_new = true %}
    {% endif %}

{% endfor %}
{% capture email_body %}
  {% case delivery_method %}
      {% when 'pick-up' %}
        You’ll receive an email when your order is ready for pickup.
      {% when 'local' %}
        Hi {{ customer.first_name }}, we're getting your order ready for delivery.
      {% else %}
        Hi {{ customer.first_name }}, We've received your 901 Academy reservation. Please bring a government issued ID and your reservation number with you to class.
    {% endcase %}
      {% if delivery_instructions != blank  %}
        

**Delivery information:** {{ delivery_instructions }}

      {% endif %}
      {% if bctv_new %}
    

BCTV TEST MESSAGE HERE

      {% endif %}
 {% endcapture %}

Does not work unfortunately.

1 Like

@901Academy213

sorry for that issue i think some thing is work can change other condition or customization code