Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I am trying to add a "gift-note" to my "Print with Order Printer" packing slip template. I had added code into my shopping cart to add gift wrapping (using these instructions https://help.shopify.com/themes/customization/cart/add-gift-wrap-option) but now I cannot figure out how to add into the template the gift-note people fill out when adding gift wrapping in their cart.
I tried adding this into the template
{% if gift-note %}
<p><strong>NOTE: {{ gift-note }}</strong></p>
{% endif %}
but that doesn't work.
Can someone help me?
Hi Michelle,
Try
{% if order.attributes.gift-note %}
<p><strong>NOTE: {{ order.attributes.gift-note }}</strong></p>
{% endif %}
That should do the trick.
Cheers,
Elliott
Hey Michelle,
Elliot is on the right track, but the code does need one modification to work:
{% if attributes.gift-note %}
<p><strong>NOTE: {{ attributes.gift-note }}</strong></p>
{% endif %}
So just removing order. from the variables. In Order Printer you should not add order. in front of variables as that is already taken care of 😉
Hope it helps,
Bjorn
I have tried using all of the coding in this thread, but none of the variations have resulted in the gift note appearing on my packing slip. I have tried adding "cart." in front of attribute in addition to many other alterations. Any insight?
Are you using the Order Printer app ? The code examples in this thread will only work for templates in that specific app.