How can I display product tags on a packing slip?

Topic summary

A user is attempting to display product tags on a Shopify packing slip template but encountering issues—the tags aren’t appearing despite having code in place.

Key Technical Issue:

  • The original approach uses line_item.product.tags within a line_items_in_shipment loop
  • According to Shopify documentation, line_item.product is not available in packing slip templates
  • Only limited properties are accessible: image, title, variant_title, sku, vendor, quantity, shipping_quantity, and properties

Proposed Solution:

  • A later participant suggests using order.line_items instead of line_items_in_shipment
  • Code snippet provided: iterate through order.line_items and access item.product.tags
  • This workaround reportedly works successfully

Current Status:
The discussion appears resolved with the alternative approach, though the original poster’s final response suggests they may still be troubleshooting. The core limitation is Shopify’s restricted variable access within packing slip contexts.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

Hi maybe some one can help im trying to show product tags on a packing slip here is hat I have but nothing shows

{% for line_item in line_items_in_shipment %}

{% if line_item.image != blank %}
{{ line_item.image | img_url: effective_image_dimensions | img_tag: '', 'aspect-ratio__content' }}
{% endif %}

{{ line_item.title }} {% if line_item.variant_title != blank %} {{ line_item.variant_title }} {% endif %} {% if line_item.sku != blank %} {{ line_item.sku }} {% endif %}

{{ line_item.shipping_quantity }} of {{ line_item.quantity }}

{% for tag in line_item.product.tags %} {{ tag }} {% endfor %}

{% endfor %}

any ideas?

I have not tested your code but the following part of your code should do that:


{% for tag in line_item.product.tags %}
{{ tag }}
{% endfor %}

are you sore you are testing with a product which has tags?

Hi yes It definitely has tags just doesn’t show which is odd and I cant check the raw HTML as it converts it to a pdf

ok, so I checking the docs and I don’t think the line_item.product is an available property inside packaging slips:

https://help.shopify.com/en/manual/orders/packing-slips-variable-list#line-items-in-shipment-variables

Confirmed that the only properties available for the line item inside the packaging slip are:

  line_item.image
  line_item.title
  line_item.variant_title
  line_item.sku
  line_item.vendor
  line_item.quantity
  line_item.shipping_quantity
  line_item.properties

Other properties like line_item.product, line_item.product_id, line_item.final_price… or any other property from https://shopify.dev/docs/themes/liquid/reference/objects/line_item, is not available

Hi

Thanks for trying I guess the hunt continues

Hi there! I tried this and it worked fine for me:

{% for item in order.line_items %}
{% for tag in item.product.tags %}
{{ tag }}
{% endfor %}
{% endfor %}

I’m sorry if its too late haha