Adding variant images on Shopify Order Printer App template

Highlighted
New Member
26 0 0

so I'm trying to add variant images on my template, my code already shows the variants' titles that are chosen but is there a way to add the variant's image too?

 

 

<table class="table-tabular" style="margin: 0 0 1.5em 0;">
  <thead>
    <tr>
      <th>Quantity</th>
      <th>Item</th>
      {% if show_line_item_taxes %}
      <th>Taxes</th>
      {% endif %}
      <th>Price</th>
    </tr>
  </thead>
  <tbody>
    {% for line_item in line_items %}
      <tr>
        <td>{{ line_item.quantity }} x</td>
        <td><b>{{ line_item.title }}</b>
            {% for property in line_item.properties %}
              {% if property.first contains '_io_' %}{% continue %}{% endif %}
              {% if property.last == blank  %}{% continue %}{% endif %}
              <br>{{ property.first }}: {{ property.last }}
            {% endfor %}       
        </td>
        {% if line_item.tax_lines %}
          <td>
            {% for tax_line in line_item.tax_lines %}
              {{ tax_line.price | money }} {{ tax_line.title }}<br/>
            {% endfor %}
          </td>
        {% endif %}
        <td>{{ line_item.price | money }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>

 

Here's what this code looks like:

 
0 Likes