Solved

How to revise code in Order Confirmation email template to include ALL order

contg88
Visitor
2 0 1

Hi All,

I am selling a book and an audiobook in my store. Last night, I realized the Order Confirmation email template that I added custom text to was being sent to audiobook purchasers with NO text. Apparently the following code is making it so that the custom text only displays to customers who purchase the physical book because it requires shipping: {% if requires_shipping %}. Since the audiobook is marked as a product that does not need to be shipped, audiobook customers are not seeing the Order Confirmation email, which is quite unfortunate since that is where the link to the audiobook download is contained - yikes!

After receiving a couple of customer emails (luckily, I haven't made many audiobook sales) basically saying, "Um, where's my audiobook?", I scrambled to email them individually with the audiobook download link.

I don't want to continue down this path and I don't know how to edit the code in the notification template so that the SAME template is sent to ALL my customers regardless of what they purchased. 

Does anyone know what to do? I chatted with Shopify Support, but he had no idea; he said he forwarded the question to his team and will reach back out to me via email. If someone here can help me sooner, that would be so very much appreciated!

TIA,

Connie

 

Accepted Solution (1)

peterloane
Shopify Partner
44 5 14

This is an accepted solution.

Hi

If this is the code you are referring to (I added the line numbers)

1  {% capture email_title %}Thank you for your purchase! {% endcapture %}
2  {% capture email_body %}
3    {% if requires_shipping %}
4    {% case delivery_method %}
5        {% when 'pick-up' %}
6          You’ll receive an email when your order is ready for pickup.
7        {% when 'local' %}
8          Hi {{ customer.first_name }}, we're getting your order ready for delivery.
9        {% else %}
10         Hi {{ customer.first_name }}, we're getting your order ready to be shipped. We will notify you when it has been sent.
11     {% endcase %}
12       {% if delivery_instructions != blank  %}
13         <p><b>Delivery information:</b> {{ delivery_instructions }}</p>
14       {% endif %}
15   {% endif %}
16 {% endcapture %}

then deleting lines 3 and 15 should do what, if I understand your message correctly.

Copy before deleting as always 🙂

 

Regards

Peter

 

 

View solution in original post

Replies 4 (4)

peterloane
Shopify Partner
44 5 14

This is an accepted solution.

Hi

If this is the code you are referring to (I added the line numbers)

1  {% capture email_title %}Thank you for your purchase! {% endcapture %}
2  {% capture email_body %}
3    {% if requires_shipping %}
4    {% case delivery_method %}
5        {% when 'pick-up' %}
6          You’ll receive an email when your order is ready for pickup.
7        {% when 'local' %}
8          Hi {{ customer.first_name }}, we're getting your order ready for delivery.
9        {% else %}
10         Hi {{ customer.first_name }}, we're getting your order ready to be shipped. We will notify you when it has been sent.
11     {% endcase %}
12       {% if delivery_instructions != blank  %}
13         <p><b>Delivery information:</b> {{ delivery_instructions }}</p>
14       {% endif %}
15   {% endif %}
16 {% endcapture %}

then deleting lines 3 and 15 should do what, if I understand your message correctly.

Copy before deleting as always 🙂

 

Regards

Peter

 

 

contg88
Visitor
2 0 1

Hi Peter,

If this is all I need to do, then I am all set. Thank you so much - you're a life-saver!

I still haven't heard back from Shopify Support. Thank goodness for you!

Kindest regards,

Connie

FrayedKnot
Tourist
10 0 6

Thank you for this solution.  I had to do this for a client's store as well.  The store has items that do not ship -- they're local pickup only.

 

This is a critical error in the Shopify system.  In the default Order Confirmation code, there's nothing to handle the case of  requires_shipping == FALSEYou're on your own.

 

This is a big hurdle for anyone thinking of using Shopify to do online ordering for a restaurant or storefront, or selling anything to download.  In my experience, adapting Shopify to accommodate local pickup or downloadable items has been a PITA (that's an acronym).

 

I had to add an {% else %} after the {% endif %} on line 15 to get anything meaningful in my Order Confirmation for my requires_shipping == FALSE products.

 

This is an oversight, IMO, and needs to be fixed!

 

peterloane
Shopify Partner
44 5 14

Delighted to hear it was useful to you. My pleasure.
Regards

Peter