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 %}
-
outputs
Liquid error: internal
-
outputs
Liquid error: internal
-
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