So I’ve added some attributes against an order and its displayed like this in the order admin
Is there anyway to get this data into the packing slips at all?
So I’ve added some attributes against an order and its displayed like this in the order admin
Is there anyway to get this data into the packing slips at all?
You need to customize the template to pull those attributes in:
{% if order.note_attributes != blank %}
<h3>Additional Details</h3>
<ul>
{% for attribute in order.note_attributes %}
<li><strong>{{ attribute.name }}:</strong> {{ attribute.value }}</li>
{% endfor %}
</ul>
{% endif %}
or, if your data is in a single attribute called future_delivery
:
{% assign futureDelivery = order.note_attributes | where: "name", "future_delivery" | first %}
{% if futureDelivery %}
<p><strong>Future Delivery Date:</strong> {{ futureDelivery.value }}</p>
{% endif %}
Please could you share the docs where it shows that order.note_attributes
is available to use in the packing slips template?
Thanks!
I have also come across this problem, this code was given to me by the Shopify AI help bot BUT it does not work.
{% for attribute in order.note_attributes %}
<p><strong>{{ attribute.name }}:</strong> {{ attribute.value }}</p>
{% endfor %}
The CORRECT solution I found was this:
{% for attribute in order.attributes %}
<p><strong>{{ attribute.first }}:</strong> {{ attribute.last }}</p>
{%- endfor %}
I found this by using the shopify liquid docs Liquid objects it is listed as Order > Attributes
Hope this helps someone else.