How to Display a Gift Message on Your Cart Page When it was Added on Your Product Page 🏷️
If you collect gift messages with Giftship on your product page, and you would like to show this message to your customers on the cart page, you can do so by ensuring that line item properties are displaying in your theme.
While many themes have this enabled by default, others do not, and must be added in manually.
The steps to add line item properties into your theme differ on a theme by theme basis, however, the same general concepts apply to all themes.
Please note that a backup should be made to your theme prior to making any edits. Basic HTML and Liquid code knowledge is required to complete this tutorial.
- Navigate to Shopify Admin -> Online Store -> Themes -> “Your theme name” -> Actions -> Edit Code.
- Find the loop which iterates through your cart contents. This is often found in the cart.liquid file in your templates folder, or the the cart-template.liquid file in your sections folder.
- Somewhere within the loop, add the following snippet of code.
- Click save. 😀
{% assign property_size = item.properties | size %} {% if property_size > 0 %} {% for p in item.properties %} {% assign first_character_in_key = p.first | truncate: 1, '' %} {% unless p.last == blank or first_character_in_key == '_' %} {{ p.first }}: {% if p.last contains '/uploads/' %} <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a> {% else %} {{ p.last }} {% endif %} <br> {% endunless %} {% endfor %} {% endif %}
Can't find the answer in our documentation?
Contact Support Configuring Gift Messages 🏷️
Printing Gift Messages 🏷️
Conditionally Hide the Gift Message Option on Product Pages 🏷️
Editing a Gift Message After an Order Has Been Placed 🏷️
How to view orders that contain Gift Messages or Delivery Dates 🏷️
Use Shopify’s Packing Slip to Print Gift Messages 🏷️
How to Charge for a Gift Message 🏷️
Remove Name Attributes from Gift Messages 🏷️
How to Display a Gift Message on Your Cart Page When it was Added on Your Product Page 🏷️
Change the location of where the gift message appears on your orders to the order Notes section 🏷️
Ensure empty values are not submitted
Shopify Plus: Loading Giftship’s Features on the Checkout Page