Skip to main content
All CollectionsHelp ArticlesFAQ's
How to Add Product Customizer to the Order Printer App
How to Add Product Customizer to the Order Printer App
Shevaughn avatar
Written by Shevaughn
Updated over 2 years ago

The free Order Printer app allows you to print custom invoices, labels, receipts, and packing slip. However, this unfortunately does not include line item properties (Product Customizer options) by default.

You can add the Product Customizer options to your invoices by following these steps.

Choose your app plan:


Product Customizer basic plan installation

1 Go to Apps > Shopify Order Printer > Manage Templates (the top-right button) and click Invoice.

2 This screen will show you the code that generates the invoice. We're going to replace a small section of it. Find the section that looks like this:
โ€‹

{% for line_item in line_items %} {{ line_item.quantity }} x <b>{{ line_item.title }}</b> {% if line_item.tax_lines %} {% for tax_line in line_item.tax_lines %} {{ tax_line.price | money }} {{ tax_line.title }}<br> {% endfor %} {% endif %} {{ line_item.price | money }} {% endfor %}

3 We're going to replace the product title line with a new one that will show Product Customizer options after the title. Replace the line that looks like this:
โ€‹

<b>{{ line_item.title }}</b>


With one that looks like this:

<b>{{ line_item.title }}</b> {% assign previous_property = null %}{% for p in line_item.properties %}{% assign hp = p.first | first | replace: '_', true %}{% if p.last == blank or hp == 'true' %}{% assign previous_property = p %}{% continue %}{% endif %}<br><strong>{{ p.first }}:</strong> {% if p.last contains '/uploads/' %}{% assign original_file_name = null %}{% assign previous_hidden_property = previous_property.first | first | replace: '_', true %}{% if previous_hidden_property == 'true' %}{% assign previous_hidden_property_key = previous_property.first | remove_first: '_' %}{% if previous_hidden_property_key == p.first %}{% assign original_file_name = previous_property.last %}{% endif %}{% endif %}<a href="{{ p.last }}">{{ original_file_name | default: 'Click to see' }}</a>{% else %}{{ p.last | newline_to_br }}{% endif %}{% assign previous_property = p %}{% endfor %}

This will now display a list of the customization options after the product's title in your printed invoices.


Product Customizer premium plan installation

Please follow the code sample below to modify Order Printer invoices to show the "prettified" version of Product Customizer options with costs. Note the following:

  • Lines highlighted in red / beginning with a "-" symbol show you what to remove.

  • Lines highlighted in green/beginning with a "+" symbol show you what to add.

  • DO NOT include "+" or "-" signs if you copy/paste this code into your theme.

If you experience any difficulties with these changes to your Order Printer app template, please contact us and we'll be happy to assist!

1Go to Apps > Shopify Order Printer > and click on Manage Templates (the top-right button)2Click on Invoice to modify the invoice template3We're going to modify a small section of this. Please follow the guide below to modify the table in this invoice.

...(Beginning of template)

<tbody>

{% for line_item in line_items %}

+ {% assign pc_pricing_line_item = null %}{% assign pc_pricing_ref = null %}{% assign pc_pricing_qty = null %}{% for p in line_item.properties %}{% if p.first == '_pc_pricing_ref' %}{% assign pc_pricing_ref = p.last %}{% endif %}{% if p.first == '_pc_pricing_qty' %}{% assign pc_pricing_qty = p.last %}{% endif %}{% endfor %}{% if pc_pricing_ref and pc_pricing_qty %}{% for other_line_item in line_items %}{% assign other_pc_pricing_ref = null %}{% for p in other_line_item.properties %}{% if p.first == '_pc_pricing_ref' %}{% assign other_pc_pricing_ref = p.last %}{% break %}{% endif %}{% endfor %}{% if other_line_item.id != line_item.id and other_pc_pricing_ref == pc_pricing_ref %}{% assign pc_pricing_line_item = other_line_item %}{% break %}{% endif %}{% endfor %}{% elsif pc_pricing_ref and pc_pricing_qty == null %}{% continue %}{% endif %}

<tr>

<td>{{ line_item.quantity }} x</td>

- <td><b>{{ line_item.title }}</b></td>

+ <td><b>{{ line_item.title }}</b>{% for p in line_item.properties %}{% assign hp = p.first | first | replace: '_', true %}{% if p.last == blank or hp == 'true' %}{% continue %}{% endif %}<br/><strong>{{ p.first }}</strong>: {% if p.last contains '/uploads/' %}(uploaded {{ p.last | split: '.' | last }} file){% else %}{{ p.last | newline_to_br }}{% endif %}{% endfor %}</td>

+ {% if show_line_item_taxes %}

+ <td>

{% if line_item.tax_lines %}

- <td>

{% for tax_line in line_item.tax_lines %}

- {{ tax_line.price | money }} {{ tax_line.title }}<br/>

+ {% assign tax_line_price = tax_line.price %}{% for pricing_tax_line in pc_pricing_line_item.tax_lines %}{% if pricing_tax_line.title == tax_line.title %}{% assign tax_line_price = tax_line_price | plus: pricing_tax_line.price %}{% break %}{% endif %}{% endfor %}

+ {{ tax_line_price | money }} {{ tax_line.title }}<br/>

{% endfor %}

- </td>

{% endif %}

+ </td>

+ {% endif %}

- <td>{{ line_item.price | money }}</td>

+ <td>{% assign line_item_price = line_item.price %}{% if pc_pricing_line_item %}{% assign pricing_item_price = pc_pricing_line_item.line_price | divided_by: line_item.quantity %}{% assign line_item_price = line_item_price | plus: pricing_item_price %}{% endif %}{{ line_item_price | money }}</td>

</tr>

{% endfor %}

</tbody>

</table>

....(Rest of template)

Did this answer your question?