Currently, my Shipping & Delivery confirmation emails are showing the main product image whereas I’d like them to display the variant image instead.
I’ve managed to get the Order Confirmation email to work by changing the code from:
src="{{ line.product.featured_image | product_img_url: 'medium' }}"
to:
src="{{ line | img_url: 'medium' }}"
However, this doesn’t work on either the Shipping & Delivery emails. The product images are blank:
The current/original code (the one that’s working but doesn’t show the variant image) for both emails is:
src="{{ line.line_item.product.featured_image | product_img_url: 'medium' }}"
From what I see in the code, the main difference between the emails is that the Order Confirmation references line_items:
{% for line in line_items %}
Whereas the Shipping & Delivery Confirmation emails reference fulfillment_line_items
{% for line in fulfillment.fulfillment_line_items %}
I’m not experienced with coding by any means, so I would love some help!
Hi,
Please check below code
{% for line in fulfillment.fulfillment_line_items %}
| <br> {% if line.line_item.image %}<br> <br> {% endif %}<br> | <br> {% if line.line_item.product.title %} <br> {% assign line_title = line.line_item.product.title %} <br> {% else %} <br> {% assign line_title = line.line_item.title %} <br> {% endif %}<br><br> {% if line.quantity < line.line_item.quantity %}<br> {% capture line_display %} {{ line.quantity }} of {{ line.line_item.quantity }} {% endcapture %}<br> {% else %}<br> {% assign line_display = line.line_item.quantity %}<br> {% endif %}<br><br> {{ line_title }} × {{ line_display }}<br><br><br> {% if line.line_item.variant.title != 'Default Title' %}<br> {{ line.line_item.variant.title }}<br><br> {% endif %}<br><br> {% if line.line_item.selling_plan_allocation %}<br> {{ line.line_item.selling_plan_allocation.selling_plan.name }}<br><br> {% endif %}<br><br> {% if line.line_item.refunded_quantity > 0 %}<br> Refunded<br> {% endif %}<br><br> {% if line.line_item.discount_allocations %}<br> {% for discount_allocation in line.line_item.discount_allocations %}<br> {% if discount_allocation.discount_application.target_selection != 'all' %}<br> <br> <br> <br> {{ discount_allocation.discount_application.title | upcase }}<br> (-{{ discount_allocation.amount | money }})<br> <br> <br> {% endif %}<br> {% endfor %}<br> {% endif %}<br> |
| - | - |
{% endfor %}
Thanks
Hit Like and Accept as Solution
Hi. Thanks for this. I previewed this code and it sort of works, however the formatting is off.
This is the code I have right now:
**What's Coming**
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
Hi,
Add the code relate to image in your template.
or
Share your code here I will modify the code.
Thanks
1 Like
Hi
Here is the complete code for the Shipping Confirmation email:
<table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<table>
<tr>
<td>
[Custom Portraits](https://www.fatcatpablo.com.au/collections/all-portraits)
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
[Personalised Prints](https://www.fatcatpablo.com.au/collections/personalised-prints)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Hey {{ customer.first_name }}, we've shipped your order!**
We want to make sure that you receive it and that it doesn't go missing, so you'll be asked to **provide your signature upon delivery**.
If no one's home, it'll be sent to the nearest Australia Post drop-off location where you can pick it up at a more convenient time.
To learn more about our shipping, [click here](https://www.fatcatpablo.com.au/pages/faqs#shipping). Alternatively, send us an [email](mailto:hello@fatcatpablo.com.au) with your question and we'll get back to you as soon as possible.
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**What's Coming**
</td>
</tr>
</table>
</table>
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
{% else %}
{% endif %}
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Where It's Going**
</td>
</tr>
</table>
</table>
{% if requires_shipping %}
<table>
<table>
<tr>
<td>
We've shipped your order {% if fulfillment.tracking_company %}via {{ fulfillment.tracking_company }} {% endif %}to the following address:
{{ shipping_address.name }}
{{ shipping_address.address1 }}
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
{{ shipping_address.country }}
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
**Tracking Number:** **{{ fulfillment.tracking_numbers.first }}**.
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
Track Package
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
<table>
<table>
<tr>
<td>
The tracking numbers for these items are **{{ tracking_number }}**{% if not forloop.last %}, {% endif %}.
Here's a link to see the status of each order:
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
{% for tracking_url in fulfillment.tracking_urls %}
<table>
<table>
<tr>
<td>
Track Package #{{ forloop.index }}
</td>
</tr>
</table>
</table>
{% endfor %}
{% endif %}
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**@fatcatpabloau**
</td>
</tr>
</table>
</table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>
[

](mailto:hello@fatcatpablo.com.au)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](https://www.klaviyo.com/?utm_medium=freebie&utm_source=brand&utm_term=YqWqMm)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
And here is the code for the Delivery Confirmation email:
<table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<table>
<tr>
<td>
[Custom Portraits](https://www.fatcatpablo.com.au/collections/all-portraits)
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
[Personalised Prints](https://www.fatcatpablo.com.au/collections/personalised-prints)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
### **Hey {{ customer.first_name }}, it's with you now!**
{% if fulfillment.item_count == item_count %}All{% elsif fulfillment_status == 'fulfilled' %}The last{% else %}Some{% endif %} of the items from your order **#{{ order_number }}** have now been delivered.
See you again next time!
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**What We Delivered**
</td>
</tr>
</table>
</table>
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
{% else %}
{% endif %}
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Where We Delivered It**
</td>
</tr>
</table>
</table>
{% if requires_shipping %}
<table>
<table>
<tr>
<td>
We delivered your order {% if fulfillment.tracking_company %}via {{ fulfillment.tracking_company }} {% endif %}to the following address:
{{ shipping_address.name }}
{{ shipping_address.address1 }}
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
{{ shipping_address.country }}
</td>
</tr>
</table>
</table>
{% endif %}
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
### **@fatcatpabloau**
</td>
</tr>
</table>
</table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>
[

](mailto:hello@fatcatpablo.com.au)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](https://www.klaviyo.com/?utm_medium=freebie&utm_source=brand&utm_term=YqWqMm)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
Thanks so much.
Hi
Here’s the code for the shipping confirmation email:
<table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<table>
<tr>
<td>
[Custom Portraits](https://www.fatcatpablo.com.au/collections/all-portraits)
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
[Personalised Prints](https://www.fatcatpablo.com.au/collections/personalised-prints)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Hey {{ customer.first_name }}, we've shipped your order!**
We want to make sure that you receive it and that it doesn't go missing, so you'll be asked to **provide your signature upon delivery**.
If no one's home, it'll be sent to the nearest Australia Post drop-off location where you can pick it up at a more convenient time.
To learn more about our shipping, [click here](https://www.fatcatpablo.com.au/pages/faqs#shipping). Alternatively, send us an [email](mailto:hello@fatcatpablo.com.au) with your question and we'll get back to you as soon as possible.
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**What's Coming**
</td>
</tr>
</table>
</table>
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
{% else %}
{% endif %}
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Where It's Going**
</td>
</tr>
</table>
</table>
{% if requires_shipping %}
<table>
<table>
<tr>
<td>
We've shipped your order {% if fulfillment.tracking_company %}via {{ fulfillment.tracking_company }} {% endif %}to the following address:
{{ shipping_address.name }}
{{ shipping_address.address1 }}
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
{{ shipping_address.country }}
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
**Tracking Number:** **{{ fulfillment.tracking_numbers.first }}**.
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
Track Package
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
<table>
<table>
<tr>
<td>
The tracking numbers for these items are **{{ tracking_number }}**{% if not forloop.last %}, {% endif %}.
Here's a link to see the status of each order:
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
{% for tracking_url in fulfillment.tracking_urls %}
<table>
<table>
<tr>
<td>
Track Package #{{ forloop.index }}
</td>
</tr>
</table>
</table>
{% endfor %}
{% endif %}
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**@fatcatpabloau**
</td>
</tr>
</table>
</table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>
[

](mailto:hello@fatcatpablo.com.au)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](https://www.klaviyo.com/?utm_medium=freebie&utm_source=brand&utm_term=YqWqMm)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
Hi!
Thanks!
Here it is:
<table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<table>
<tr>
<td>
[Custom Portraits](https://www.fatcatpablo.com.au/collections/all-portraits)
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
[Personalised Prints](https://www.fatcatpablo.com.au/collections/personalised-prints)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Hey {{ customer.first_name }}, we've shipped your order!**
We want to make sure that you receive it and that it doesn't go missing, so you'll be asked to **provide your signature upon delivery**.
If no one's home, it'll be sent to the nearest Australia Post drop-off location where you can pick it up at a more convenient time.
To learn more about our shipping, [click here](https://www.fatcatpablo.com.au/pages/faqs#shipping). Alternatively, send us an [email](mailto:hello@fatcatpablo.com.au) with your question and we'll get back to you as soon as possible.
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**What's Coming**
</td>
</tr>
</table>
</table>
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
{% else %}
{% endif %}
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Where It's Going**
</td>
</tr>
</table>
</table>
{% if requires_shipping %}
<table>
<table>
<tr>
<td>
We've shipped your order {% if fulfillment.tracking_company %}via {{ fulfillment.tracking_company }} {% endif %}to the following address:
{{ shipping_address.name }}
{{ shipping_address.address1 }}
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
{{ shipping_address.country }}
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
**Tracking Number:** **{{ fulfillment.tracking_numbers.first }}**.
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
Track Package
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
<table>
<table>
<tr>
<td>
The tracking numbers for these items are **{{ tracking_number }}**{% if not forloop.last %}, {% endif %}.
Here's a link to see the status of each order:
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
{% for tracking_url in fulfillment.tracking_urls %}
<table>
<table>
<tr>
<td>
Track Package #{{ forloop.index }}
</td>
</tr>
</table>
</table>
{% endfor %}
{% endif %}
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**@fatcatpabloau**
</td>
</tr>
</table>
</table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>
[

](mailto:hello@fatcatpablo.com.au)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](https://www.klaviyo.com/?utm_medium=freebie&utm_source=brand&utm_term=YqWqMm)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
Hi,
Try this.
<table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<tr>
<td>
[

](www.fatcatpablo.com)
</td>
</tr>
</table>
<table>
<table>
<tr>
<td>
[Custom Portraits](https://www.fatcatpablo.com.au/collections/all-portraits)
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
[Personalised Prints](https://www.fatcatpablo.com.au/collections/personalised-prints)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Hey {{ customer.first_name }}, we've shipped your order!**
We want to make sure that you receive it and that it doesn't go missing, so you'll be asked to **provide your signature upon delivery**.
If no one's home, it'll be sent to the nearest Australia Post drop-off location where you can pick it up at a more convenient time.
To learn more about our shipping, [click here](https://www.fatcatpablo.com.au/pages/faqs#shipping). Alternatively, send us an [email](mailto:hello@fatcatpablo.com.au) with your question and we'll get back to you as soon as possible.
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**What's Coming**
</td>
</tr>
</table>
</table>
<table>
{% if fulfillment.fulfillment_line_items %}
{% for line in fulfillment.fulfillment_line_items %}
{% endfor %}
<table>
<tr>
<th>
</th>
<th>
</th>
</tr>
<table>
<tr>
<td>
{% if line.line_item.image %}
{% endif %}
</td>
</tr>
</table>
**{{ line.line_item.title }}**
Quantity: {{ line.line_item.quantity }}
</table>
{% else %}
{% endif %}
</table>
<table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**Where It's Going**
</td>
</tr>
</table>
</table>
{% if requires_shipping %}
<table>
<table>
<tr>
<td>
We've shipped your order {% if fulfillment.tracking_company %}via {{ fulfillment.tracking_company }} {% endif %}to the following address:
{{ shipping_address.name }}
{{ shipping_address.address1 }}
{{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }}
{{ shipping_address.country }}
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
**Tracking Number:** **{{ fulfillment.tracking_numbers.first }}**.
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size == 1 %}
<table>
<table>
<tr>
<td>
Track Package
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
<table>
<table>
<tr>
<td>
The tracking numbers for these items are **{{ tracking_number }}**{% if not forloop.last %}, {% endif %}.
Here's a link to see the status of each order:
</td>
</tr>
</table>
</table>
{% endif %}
{% if fulfillment.tracking_numbers.size > 1 %}
{% for tracking_url in fulfillment.tracking_urls %}
<table>
<table>
<tr>
<td>
Track Package #{{ forloop.index }}
</td>
</tr>
</table>
</table>
{% endfor %}
{% endif %}
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</table>
<table>
<table>
<tr>
<td>
**@fatcatpabloau**
</td>
</tr>
</table>
</table>
<table>
<table>
<table>
<table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
<table>
<tr>
<td>
[

](mailto:hello@fatcatpablo.com.au)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
</table>
</table>
<table>
<table>
<table>
<table>
<tr>
<td>
[

](https://www.klaviyo.com/?utm_medium=freebie&utm_source=brand&utm_term=YqWqMm)
</td>
</tr>
</table>
</table>
</table>
</table>
</table>
Thanks
Hit like and Accept as Solution
1 Like
Thank you SO MUCH. That worked! I also applied the same code change to the Delivery Confirmation email which works too. So appreciative, thank you again.
If you had a spare moment, I’d love to understand what you changed and why my previous code wasn’t working?
Hi,
Glad to hear.
I have just added the right code for image tag only .
Compare your previous code carefully. You will get a idea.
Thanks