App reviews, troubleshooting, and recommendations
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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024