print custom order information in Order Printer

Highlighted
New Member
3 0 0

I have added HTML (below) and created a new product template.  How do I have this information added to a template in Order Printer so that it prints out the information?

 

<p class="line-item-property__field">
<label>Do you wish to have the ribbon? Yes or No?</label>
<input type="radio" name="properties[Do you wish to have the ribbon? Yes or No?]" value="No-I prefer not to have the ribbon."> <span>No-I prefer not to have the ribbon.</span><br>
<input type="radio" name="properties[Do you wish to have the ribbon? Yes or No?]" value="Yes-I'd like the ribbon"> <span>Yes-I'd like the ribbon.</span><br>
</p>
<p class="line-item-property__field">
<label>Do you wish to have the burlap bag, or no?</label>
<input type="radio" name="properties[Do you wish to have the burlap bag, or no?]" value="No-please keep the burlap bag"> <span>No-please keep the burlap bag</span><br>
<input type="radio" name="properties[Do you wish to have the burlap bag, or no?]" value="Yes-I'd like the burlap bag."> <span>Yes-I'd like the burlap bag.</span><br>
</p>
<p class="line-item-property__field">
<label for="if-desired-please-identify-to-whom-tracy-should-personalize-this-product-on-the-back-of-the-plaque-ie-stephanie-you-are-the-cats-meow-xo-tracy-porter">If desired, please identify to whom Tracy should personalize this product on the back of the plaque: i.e., "Stephanie, you are the cat's meow! XO Tracy Porter"</label>
<textarea rows="4" cols="50">
</textarea>

0 Likes

Hello 

 

 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
New Member
3 0 0

Thanks Pallavi.  Order Notes are more general.  There is information specific to a product that I need to receive from the customer.  That is why I put in the code.  Now, all I need is to be able to print an order and show the information that the customer entered.  But the Print Order prints the order without the information the customer entered....  Do you know of a way to edit how the order is printed so that that information is included?  Thank you!!

0 Likes

Hey there,

 

You can add this info to your templates, by looping over the properties on each line item. So for example:

 

{% for line_item in line_items %}
  {% for property in line_item.properties %}
    <p><b>{{ property.first }}:</b> {{ property.last }}</p>
  {% endfor %}
{% endfor %}

This will then show the following:

 

Do you wish to have the ribbon? Yes or No? No-I prefer not to have the ribbon.

Do you wish to have the burlap bag, or no? No-please keep the burlap bag

 

etc.

 

Hope it helps :)

 

Bjorn

 

Ps. If you want to save yourself the hassle of messing with code yourself, then my app Order Printer Templates can help you. It has built in support for the line item properties in every template: https://apps.shopify.com/order-printer-templates

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes