Update Gift Card Email Template
We recommend adjusting the gift card email template for the optimal customer experience. This ensures your customers will receive ShareCart-themed communications. You can read more about why this is important here.
Note: Updating your email template will not affect your standard gift card notifications.
Follow the below steps to get started.
- 1
- Head to Settings in your Shopify admin.
- 2
- Select Notifications from the left navigation menu. Head to the orders section and choose Gift card created.
- 3
- Then select the Edit code button.
- 4
-
In the Email tab copy and paste the code below into the
Email subject field.
{% if gift_card.product.title contains "ShareCart" %} {{ gift_card.product.title }} confirmed {% else %} {{ shop.name }} {{ gift_card.balance | money_without_trailing_zeros }} gift card {% endif %}
- 5
-
Finally copy and paste the code below into the
Email body (HTML) field.
{% if gift_card.product.title contains "ShareCart" %} {% assign isShareCartOrder = true %} {% else %} {% assign isShareCartOrder = false %} {% endif %} {% capture email_title %} {% if isShareCartOrder %} Your order has been placed {% else %} Your gift card {% endif %} {% endcapture %} {% capture email_body %} {% if isShareCartOrder %} Thank you, your ShareCart order has been placed and the shopper has been notified. {% else if gift_card.expires_on %} Your {{ gift_card.balance | money_without_trailing_zeros }} gift card for {{ shop.name }} is active. Keep this email or write down your gift card number. This gift card expires on {{ gift_card.expires_on }}. {% else %} Your {{ gift_card.balance | money_without_trailing_zeros }} gift card for {{ shop.name }} is active. Keep this email or write down your gift card number. {% endif %} {% endcapture %} <!DOCTYPE html> <html lang="en"> <head> <title>{{ email_title }}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css"> <style> .button__cell { background: {{ shop.email_accent_color }}; } a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; } </style> </head> <body> <table class="body"> <tr> <td class="empty-line"> </td> </tr> <tr> <td class="empty-line"> </td> </tr> <tr> <td> <table class="row content"> <tr> <td class="content__cell"> <center> <table class="container"> <tr> <td> {% if isShareCartOrder %} <img src="https://sharecart-cdn.s3.amazonaws.com/sharecart-logo.png" alt="ShareCart logo" width="200" height="33" style="margin: 20px 0;"> {% endif %} <h1>{{ email_title }}</h1> <table class="row actions"> <tr> <td class="empty-line"> </td> </tr> </table> {% if isShareCartOrder == false %} <img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card image" width="240" height="160"> {% endif %} <table class="row actions"> <tr> <td class="empty-line"> </td> </tr> </table> <p>{{ email_body }}</p> <table class="row actions"> {% if isShareCartOrder %} <tr> <td class="actions__cell"> {% if shop.url %} <table class="link secondary-action-cell"> <tr> <td class="link__cell"><a href="{{ shop.url }}" class="link__text">Visit our store</a></td> </tr> </table> {% endif %} </td> </tr> {% else %} <tr> <td class="empty-line"> </td> </tr> <tr> <td class="actions__cell"> <table class="button main-action-cell"> <tr> <td class="button__cell"><a href="{{ gift_card.url }}" class="button__text">View gift card</a></td> </tr> </table> </td> </tr> {% endif %} </table> <br /> {% if gift_card.pass_url %} <a href="{{ gift_card.pass_url }}" class="apple-wallet-button"> <img src="{{ 'gift-card/add-to-apple-wallet.png' | shopify_asset_url }}" alt="Add to Apple Wallet" width="120" height="40"> </a> {% endif %} </td> </tr> </table> </center> </td> </tr> </table> <table class="row footer"> <tr> <td class="footer__cell"> <center> <table class="container"> <tr> <td> <p class="disclaimer__subtext">If you have any questions, reply to this email or contact us at <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p> </td> </tr> </table> </center> </td> </tr> </table> <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" /> </td> </tr> </table> </body> </html>
Note: We recommend testing your new ShareCart themed email updates works before saving the code. Follow the steps below to make sure the email template appears as expected.
- 6
- In your email template code, on the fourth line change the "false" to "true". Now hit Preview to see the ShareCart banner appear.
- 7
- Important: If the test worked, make sure you change the "true" back to its original value of "false". Now hit Save.
If you have any issues setting up your ShareCart email templates, please contact us at support@sharecart.app.