Adding uploaded images to your invoice and packing slip templates

It's possible to add the customer's uploaded images to your printable Shopify templates such as invoices and packing slips.

To do this, first enable the 'Add a direct link to the file' option in your UploadKit field settings:

Note that this only applies to future orders.

Then, you need to edit your invoice or packing slip template code inside the Order Printer app (or you can edit the packing slip template in your Shopify checkout settings if you're not using Order Printer).

First, find this line in your template:

{% for line_item in line_items %}

(This line might instead be:)

{% for line_item in line_items_in_shipment %}

Before the closing {% endfor %} tag, and where you want the images to appear, paste this code in:

{% for p in %}
    {% if p.first contains "direct link" %}
        <p>{{ p.first }}:<br />
            <a href="{{ p.last }}"><img src="{{ p.last }}" alt="{{ p.first }}" width="80" border="0" style="width: 80px; height: auto !important;"></a>
    {% endif %}
{% endfor %}

You can change the width 80 above if you need it larger or smaller.

You might usually place this code underneath the {{ line_item.title }} code, but you can choose anywhere you like as long as it is between the {% for line_item... %} and {% endfor %} tags.

Still need help? Contact Us Contact Us