Only Show Gift Messages on Shopify’s Packing Slip Template If They Are Present
Adding a check to your Shopify Packing Slip template to only show gift message if they are added can be accomplished with the following code:
{% for line_item in line_items_in_shipment %}
{% for p in line_item.properties %}
{% if
p.first == "gift" or
p.first == "To" or
p.first == "From" or
p.first == "Message"
%}
<p>{{ p.first }}: {{ p.last }}</p>
{% endif %}
{% endfor %}
{% endfor %}
Please note: This tutorial is for gift messages that are added on the product page, and passed through to the order as line items.
Can't find the answer in our documentation?
Contact Support Preventing Checkout Until Giftship Bundles are Loaded
General Troubleshooting
Configuring Your Customer Account Page
Troubleshooting Bundle Items Not Being Added to the Cart
Only Show Gift Messages on Shopify’s Packing Slip Template If They Are Present
Troubleshooting Conditional Logic
Preventing Giftship’s Features from Being Removed from the Cart Page When Using The Prestige Theme
How to Disable the “gistToken” Attribute in the Additional Details of Your Orders
Troubleshooting multi-address orders not splitting in to child orders 💡
Troubleshooting Required Delivery Date, Message, or Product Options Details Not Being Added 💡
Troubleshooting Shipping Rates Not Loading 💡
Troubleshooting the apps features not showing up 💡
Using “Buy Now” Button is Skipping Giftship’s Features 💡
Shopify Plus: Configuring Avalara to Honour Shopify’s Tax Settings