Order Printer template - display product collections

Hi All,

I’m trying to display the product’s collections on a custom Order Printer template. But I get nothing or errors.

{% for line_item in line_items %}
  <!-- 1. debug --> 
  {{line_item.product | json}}

  <!-- 2. debug -->
  {{line_item.product.collections.first | json}}

  <!-- 3. output collections -->
  <p>Collections: {% for coll in line_item.product.collections %}{{coll.title}}{% endfor %}</p>
{% endfor %}
  1. outputs Liquid error: internal

  2. outputs Liquid error: internal

  3. outputs Collections:

This suggests to me that the Order Printer liquid is different to the normal Shopify liquid API and that the product object of line_item doesn’t include collections like the api suggests. Does anyone know if this is true? or am I missing something with my code?

I also can’t explain why 1. doesn’t work. any thoughts?

Many thanks

Hey, perhaps if no one knows the answer to getting the collections, does anyone know why my debug isn’t working?

… Or what the schema is for the Order Printer template objects?

If I can find out what props are available to me, I can take it from there. But I can’t figure out a way of finding out what props i have.

Cheers