gift message not getting added to recipient gift template cards purchased in my store

Topic summary

A Shopify store owner is experiencing an issue where gift card recipients cannot see who sent them the gift card, forcing customers to contact support for this information.

Current Problem:

  • Gift card notification emails display sender information (name, email, or phone) from the purchaser’s customer account
  • The custom message that purchasers can add for recipients is not appearing in the email template

Template Code Issue:

  • The code includes a conditional block to display gift_card.message if it’s not blank
  • However, the actual gift message variable appears corrupted or improperly formatted in the provided template code
  • The HTML/template syntax shows significant formatting errors and reversed text (appears backwards in sections)

Status:

  • The store owner is seeking help to identify what’s missing or incorrect in their email template
  • They want to properly display the submitted gift message in the Gift Card notification email
  • No solutions have been provided yet in this discussion
Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

When customers purchase gift cards , they can indicate a recipient, and that info can also be added in the email . The problem is that the recipient of the gift card never knows who sent them a gift card and end up having to write to customer service to find out. So, somebody please tell me whats issue with our present email template below mentioned

Am I missing something here or is there another way I can display this submitted message in the Gift Card notification email?

template code used -

{% if gift_card.customer %}
{% if gift_card.customer.name != blank %}
{% assign sender_name = gift_card.customer.name %}
{% elsif gift_card.customer.email != blank %}
{% assign sender_name = gift_card.customer.email %}
{% else %}
{% assign sender_name = gift_card.customer.phone %}
{% endif %}
{% else %}
{% assign sender_name = Someone’s %}
{% endif %}

{% capture email_body %}
{% if gift_card.expires_on %}
{{ sender_name }} given you the gift of a full fridge! Your {{ gift_card.balance | money_without_trailing_zeros }} gift card for {{ shop.name }} is now active. Click the link below to stock up, and reach out at hi@.com with any questions! Please keep this email handy or write down your gift card number.
{% else %}
{{ sender_name }} given you the gift of a full fridge! Your {{ gift_card.balance | money_without_trailing_zeros }} gift card for {{ shop.name }} is now active. Click the link below to stock up, and reach out at hi@.com with any questions! Please keep this email handy or write down your gift card number.
{% endif %}
{% endcapture %}

{{ email_title }} .button__cell { background: {{ shop.email_accent_color }}; } a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
 
 

{{ email_title }}

 

Gift card image

 

{% if gift_card.message != blank %}

Gift Message: {{ gift_card.message }}
{% endif %}

{{ email_body }}

 
Redeem Your Gift Card!

{% if gift_card.pass_url %}

Add to Apple Wallet

{% endif %}

If you have any questions, reply to this email or contact us at {{ shop.email }}