Accepting credit cards, warehouses, and shipping and fulfilling orders
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi
I have created a new template called product.gift-product.json and an associated gift-product.liquid file. To the liquid file I have added the following code to create a field to collect a message to be included in a card.
{% comment %} added next 4 lines to add message collection box to gift template {% endcomment %}
<p class="line-item-property__field">
<label for="your-message">Card message</label><br>
<textarea rows="6" cols="60" id="your-message" name="properties[Your message]"></textarea>
</p>
It is included as part of the buy button. It results in the gift product looking like this.
It works fine and adds the message to the order but I need it to display on the packing slip.
I have messed about with various line items such as the example below to try to get an output but can't get it to work.
{% if line_item.your-message != blank %}
<span class="line-item-description-line">
{{ line_item.your-message }}
</span>
{% endif %}
What code should I be using? Any help appreciated. I am using Shopify 2.0 Taste theme
Hi, did you ever resolve this? I'm trying to achieve a similar result but struggling to find info.
Nige
Probably a bit late but might help someone else - this worked a treat for me