Gift Card Add Custom Message field to Email template

DaveAndHeidi
Visitor
2 0 0

I want to add the Customers custom message to the email.

i would have assumed this would be a std feature for gift cards, wanting to know who has sent you the gift and why.

 

I have 2 fields one of the Cart page Special instructions for seller and one on the Product Page {{ custom_message }}.

 

Ive tried pasting the same custom message code that is in the invoice template email and it doesnt show up.

 

can some please help with the coding.

 

Current Code


{% capture email_title %}
Your gift card
{% endcapture %}
{% capture email_body %}
{% 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 }}.
<br />

{% 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>

<table class="row">
<tr>
<td class="shop-name__cell">
{%- if shop.email_logo_url %}
<img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
{%- else %}
<h1 class="shop-name__text">
<a href="{{shop.url}}">{{ shop.name }}</a>
</h1>
{%- endif %}
</td>

<body>
<table class="body">
<tr>
<td class="empty-line">&nbsp;</td>
</tr>
<tr>
<td class="empty-line">&nbsp;</td>
</tr>
<tr>
<td>
<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>

 



<h1>{{ email_title }}</h1>
<table class="row actions">
<tr>
<td class="empty-line">&nbsp;</td>
</tr>
</table>

<img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card image" width="240" height="160">
<table class="row actions">
<tr>
<td class="empty-line">&nbsp;</td>
</tr>
</table>

<p>{{ email_body }}</p>

<table class="row actions">
<tr>
<td class="empty-line">&nbsp;</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>
</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>

 

Replies 0 (0)