Adding Custom Receipt Message To Order Confirmation

If you want to include a dedicated donation receipt without sending multiple emails, adding a custom donation snippet to your Order Confirmation Email is an effective way to do this.


To get started, follow the instructions here: https://help.shopify.com/en/manual/fulfillment/setup/notifications/customizing-notification-template#customize-specific-email-templates


Once you have the custom template you desire, you can add the following code:


<table class="container">
  {%- comment -%}
** Do Not Make Changes to this Section, see below **
This is the DonateMate donation receipt insert. 

Changes to this code change the way your order confirmation email looks when you send it. 
This comment will not appear.

{%- endcomment -%}
  <tr>
    <td>
        <table class="row section">

          {%- assign donation_present = false -%}
          {%- assign total_donation = 0 -%}

          {%-for item in line_items -%}
          {%- if item.product.tags contains 'DonateMate' -%}
            {%- assign donation_present = true -%}
          {%- if donation_present -%}
            {%- break -%}
          {%- endif -%}
          {%- endif -%}
          {%- endfor -%}
          {%- if donation_present -%}
            {%- for item in line_items -%}
              {%- if item.product.tags contains 'DonateMate' -%}
                {%- assign total_donation = total_donation | plus: item.original_line_price -%}
              {%- endif -%}
            {%- endfor -%}

{% comment %}*** EDIT ONLY BELOW THIS LINE ***{% endcomment %} 

<tr>
  <td>
    <h3>Official Donation Receipt</h3>
  </td>
</tr>
<tr>
  <td>
  <h4>Paid by</h4>
  <h6>{{billing_address | format_address}}</h6>
</td>
<td>
  <h4>Received By</h4>
  <h4>{{shop.name}}</h4>
  <h5>ABN/503c Certificate: 123456789 </h5>
  <h5>{{shop.address || format_address}}</h5>
</td>
</tr>
       <tr>
          <td class="section__cell">
            <top>
            <h4>Order #{{order.order_number}}</h4>
            <h4>{{ order.created_at | date: format: 'abbreviated_date' }}</h4>
            <h4>Donation amount {{ total_donation | money_with_currency}}</h4>
          </top>
          </td>
        </tr>
        <tr>
          <td>
            <h5>Donation Terms and Conditions:</h5>
            <h5>Not a real donation, this is a demo site only</h5>
          </td>
        </tr>
    {% endif %}
  </table>
  </td>
  </tr>
</table>

{% comment %}
End DonateMate Section
{% endcomment %}

You can make any changes you'd like below the specified line, the section above will ensure that the data will only show up when a transaction includes a donation.


For the full reference of the available Liquid tags, see here: https://help.shopify.com/en/manual/fulfillment/setup/notifications/email-variables


If you have any questions, just reach out to support@donatemate.app

Still need help? Contact Us Contact Us