Skip to main content

Documentation Portal

Email Notifications Adjustments

Include Duties in Your Email Templates

The following templates are located under Shopify Admin > Settings > Notifications.

  • Order Confirmation

  • Order Cancellation

  • Pending Payment Success

  • Order Refund

To include duties in your email templates, use the following code:

{% if current_total_duties or total_landed_cost_additional_fees %}
 {% assign total_duties_line = 0 %}
 {% if current_total_duties %}
   {% assign total_duties_line = total_duties_line | plus: current_total_duties %}
 {% endif %}
 {% if total_landed_cost_additional_fees %}
   {% assign total_duties_line = total_duties_line | plus: total_landed_cost_additional_fees %}
 {% endif %}
 <tr class="subtotal-line">
  <td class="subtotal-line__title">
   <p>
   <span>Duties</span>
   </p>
  </td>
  <td class="subtotal-line__value">
    <strong> {{ total_duties_line | money }} </strong>
  </td>
 </tr>
{% endif %}

To exclude the Taxes line when the amount is 0, adjust your template as shown below:

{% if tax_price > 0 %}
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>Taxes</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <strong>{{ tax_price | money }}</strong>
  </td>
</tr>
{% endif %}
Draft Order Invoice Notification

Adjust the Draft Order Invoice notification per Merchant to ensure that the invoice:

  • Does not display a zero value for shipping and taxes

  • Does display Calculated at checkout.

Order_Summary.png

If your Draft Order Invoice notification template contains a condition for delivery_method == "pickup', use the snippet below:

{% elsif delivery_method == ''%}
<tr class="subtotal-line">
  <td class-"subtotal-line_title">
    <p>
      <span>Shipping</span>
    </p>
  </td>
  <td class="subtotal-line_value">
    <strong>Calculated at checkout</strong>
  </td>
</tr>
{% else %}

If your Draft Order Invoice notification template does not contain a condition for delivery_method, use this snippet instead, replacing your domestic country code on line 1 where indicated.

{% if shipping_address && shipping_address.country_code != '<<REPLACE WITH DOMESTIC COUNTRY CODE>>' %}
<tr class = "subtotal-line">
  <td class = "subtotal-line__title">
    <p>
      <span>Shipping</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <strong>Calculated at checkout</strong>
  </td>
</tr >
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>Duties & Taxes</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <strong>Calculated at checkout</strong>
  </td>
</tr>

{% else %}
<!-- Leave existing Domestic Shipping/D&T template details here -->

{% endif %}
Prevent Payment on an Expired Order

To prevent a situation in which a customer receives an e-mail to resubmit payment for an expired Global-e order, you must adjust the Pending Payment error notification e-mail.

The Pending Payment error email can be edited in the Shopify Admin by going to Settings > Notifications > Customer Notifications > Pending payment error > Edit code.

Find:

{% capture email_body %}
You have not been charged, please try paying for the order again.
{% endcapture %}

Replace with:

{% assign gateway_is_globale = false %}
{% if order.gateway contains "Global-e" %}
  {% assign gateway_is_globale = true %}
{% endif %}

{% if gateway_is_globale %}
  {% capture email_body %}Your payment couldn't be processed for order {{ order_name }}, please try to reach back to the website and place an order again.{% endcapture %}
{% else %}
  {% capture email_body %}You have not been charged, please try paying for the order again.{% endcapture %}
{% endif %}

Find:

    <table class="row actions">
      <tr>
        <td class="actions__cell">
          <table class="button main-action-cell">
            <tr>
              <td class="button__cell"><a href="{{ checkout_payment_collection_url }}" class="button__text">Pay now</a></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>

Replace with:

{% unless gateway_is_globale %}
    <table class="row actions">
      <tr>
        <td class="actions__cell">
          <table class="button main-action-cell">
            <tr>
              <td class="button__cell"><a href="{{ checkout_payment_collection_url }}" class="button__text">Pay now</a></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
{% endunless %}
Remove "Total paid today"

If you prefer to exclude the “Total paid today” from the order confirmation emails, you can do so by removing the below code block from the notification template.

Please note that this code block will appear twice, so you will need to remove both instances.

<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>Total paid today</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | money_with_currency }}</strong>
  </td>
</tr>