Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Can't get custom gift card graphic to display in gift card page and email templates - Dawn theme

Can't get custom gift card graphic to display in gift card page and email templates - Dawn theme

LB2022
Excursionist
25 1 5
I'm using the Dawn theme version 11.0.0. I've just set up a gift card and I'm having trouble getting a customized card graphic to display in the gift card page and in the gift card email template. I've used Shopify's instructions - which are for vintage themes - but nothing is working.
 
Hoping someone can supply the proper code to use in these three files - liquid template file, and the two email files found in admin area settings > notifications. And provide the location to use to store the custom graphic. Also if any rules about the graphic file naming or type (svg, png, jpg) need to be followed, I appreciate that info.
 
gift_card.liquid
Here's the code in my gift card template, starting at line 126:
<main>
      <div class="gift-card__image-wrapper">
        {%- if settings.logo != blank -%}
          {%- assign logo_alt = settings.logo.alt | default: shop.name | escape -%}
          {{ settings.logo | image_url: width: 170 | image_tag: class: 'gift-card__image', alt: logo_alt }}
        {%- else %}
        <img
            class="gift-card__image"
            src="{{ 'gift-card/card.svg' | shopify_asset_url }}"            alt=""
            height="{{ 570 | divided_by: 1.5 }}"
            width="570"
          >
          {%- endif %}
      </div>
       <h2>{{ shop.name }}</h2>
   ....rest of code....
According to Shopify's instructions I need to upload a custom graphic file to the Assets folder and then replace 'gift-card/card.svg' with the name of the uploaded file, and change 'shopify_asset_url' to asset_img_url: '1024x1024'. Did all of that and it didn't change anything.
 
Here's what the gift card template looks like in my admin area. The "2xEDGE" circled in red is where the gift card should appear - but doesn't.
 
LB2022_0-1696516027287.png

 

 
I'm having the same issue - can't display custom gift card image - with the gift card email templates that are sent by the Shopify system. 
 
Gift card issued email - relevant code (starting at line 188):
<table align="center" class="giftcard__topmargin">
  <tr>
    <td>
      {%- if shop.email_logo_url %}
        <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" class="giftcard__logosize">
      {%- else %}
        <img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card image" width="240" height="160">
      {% endif %}
    </td>
  </tr>
</table>
Gift card confirmation email - relevant code (starting at line 86):
<table align="center" class="giftcard__topmargin">
  <tr>
    <td>
      {%- if shop.email_logo_url %}
        <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" class="giftcard__logosize">
      {%- else %}
        <img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card image" width="240" height="160">
      {% endif %}
    </td>
  </tr>
</table>
Here's what these emails look like. The "2xEDGE" circled in red is where the custom graphic should display.
 
Gift card issued
LB2022_1-1696516442780.png

 

Gift card confirmation

LB2022_2-1696516544884.png

Thanks in advance for any/all help!

Reply 1 (1)

og2u
Visitor
1 0 0

Hello, I'm having the same issue. Please, did you find the solution? 
Thank you in advance.