Adding "gift-note" to Order Printer Template

Highlighted
New Member
2 0 0

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?

0 Likes
Highlighted
Shopify Partner
132 1 18

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

Feeling a bit lost? Contact elliot@mandelbrotian.com for help with theme setup, alterations, custom functionality, and app development.
0 Likes
Highlighted

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

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes
Highlighted
New Member
1 0 0

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?

0 Likes