Troubleshooting issues for your imported Order Printer templates
When you migrate your templates from the legacy Order Printer app to the new Shopify Order Printer app, your Liquid variables are updated to ensure compatibility with the new app. In rare cases, you might need to troubleshoot your imported templates.
If your imported templates aren't printing correctly, then you might need to manually edit your template's code in the new Shopify Order Printer app. Review the following most common reasons why templates might not import correctly:
- Templates include custom CSS
- Templates contain metafields
- Liquid variables might not update correctly
On this page you can find detailed information on how to troubleshoot potential issues when importing your custom templates to the new Shopify Order Printer app.
On this page
Updating common CSS design customizations
If the templates that you're transferring include custom CSS, then you might need to manually update the CSS code in your templates to correctly display design elements, such as images, custom fonts, logos, or barcodes.
- Add your logo to a template
- Add images to a template
- Make table widths 100%
- Display product thumbnails
- Add order details
- Add a barcode to a template
- Add a QR code to a template
- Using a Google font in a template
- Increasing the font size
Updating metafield variables
To access a metafield, you need to specify the metafield's namespace, and you don't need to add the .value
to the variable. Learn more about metafield definitions.
For example, instead of the product.metafields.custom.manufacturerid.value
variable, use theproduct.metafields.custom.manufacturerid
variable.
To identify namespace values for each metafield, refer to the Custom data page in your Shopify admin. metafield definitions are grouped by the objects they refer to, such as products, variants, or orders.
Updating common Liquid variables
In most cases your Liquid variables automatically update during the migration process. However, if your templates don't migrate correctly and you use any of the variables listed in this section, then you might need to replace your old variables with new variables manually. The Shopify Order Printer app uses different variables to the legacy Order Printer app.
For example, if you use the date
variable, then you need to replace it with the created_at
variable.
Order variables
Order variables are used differently in the Shopify Order Printer app. To access order variables, you need to add the order.
prefix. For example, to access the billing_address
variable, you need to use order.billing_address
.
The following commonly used order variables are accessible without the order.
prefix:
line_items
tax_lines
fulfillments
transactions
refunds
shipping_methods
customer
For example, if you want to access the line items variable, you can use line_items
or order.line_items
.
You can also make your own aliases for your template. For example, you can use the {% assign fulfillments_count = order.fulfillments | size %}
Liquid syntax, and then reference it by using {{ fulfillments_count }}
in your code.
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
line_items |
|
credit_card | Use payment details based on each transaction from the order with the transactions.<each>.payment_details variable. |
current_shipping_price | shipping_price |
date | Use the created_at variable. Use the date filter to format the timestamp, for example with {{ order.created_at | date: "%B %e, %Y" }} . |
gateways | unique_gateways or transactions.<each>.gateway |
order_currency | currency |
processed_at | Use the created_at variable. It holds the value of order.processed_at from the GraphQL API, and it means the actual time that the order is processed at, rather than the time that the order is imported into Shopify. It is the same as order.processed_at from the legacy Order Printer app. You can use the date filter to format the timestamp, for example with {{ order.created_at | date: "%B %e, %Y" }} . |
payment_transactions |
Filter through
|
refund_transactions | Filter through order.transactions for the kind status in the Liquid syntax with where, or with looping and an if inside, as with the following example.{% assign refund_transactions = order.transactions | where: "kind", "refund" %} |
shipping_line | shipping_methods | first |
shipping_lines | shipping_methods |
show_line_item_taxes | tax_lines.size > 0 . You can define it as a variable in the beginning of the template and refer to it multiple times, as with the following example.{% if tax_lines.size > 0 %}
{% assign show_line_item_taxes = true %}
{% else %}
{% assign show_line_item_taxes = false %}
{% endif %} |
total_tax | tax_price |
total_paid | net_payment |
LineItem variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
fulfillable_quantity | quantity - successfully_fulfilled_quantity |
fulfilled | quantity == successfully_fulfilled_quantity |
name | title |
product_title | product.title |
unit_discount | quantity ? line_level_total_discount / quantity : 0 |
variant_title | variant.title |
weight | grams |
Fulfillment variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
date | created_at |
Shop variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
owner | account_owner.name |
address | shop.address.address1 |
address2 | shop.address.address2 |
city | shop.address.city |
country | shop.address.country |
country_code | shop.address.country_code |
province | shop.address.province |
province_code | shop.address.province_code |
zip | shop.address.zip |
Address variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
latitude | If the address variable was referenced from the location atrribute, then the latitude and longitude are available on the location object itself. |
longitude | If the address variable was referenced from the location atrribute, then the latitude and longitude are available on the location object itself. |
Refund variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
date | Use the created_at variable. Use the date filter to format the timestamp, for example with {{ order.created_at | date: "%B %e, %Y" }} . |
ShippingLine variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
current_price | price |
price | original_price |
Transaction variables
The following transaction variables were removed and can't be replaced in the Shopify Order Printer app:
authorization
message
test
Variant variables
Variable in the legacy Order Printer app | Variable in the new Shopify Order Printer app |
---|---|
grams | weight |
Metafield variables
To access a metafield, you need to specify the metafield's Namespace, and don't need to add the .value
to the variable.
Learn more about metafield definitions.
For example, instead of product.metafields.manufacturerid.value
variable, use product.metafields.custom.manufacturerid
variable.
To identify Namespace values for each metafield, refer to the Custom data page in your Shopify admin. Metafield definitions are grouped by the objects they refer to, such as products, variants, or orders.
Filter mapping
Filter name in the legacy Order Printer app | Filter name in the new Shopify Order Printer app |
---|---|
files_url | file_url |
payment_method and payment_methods | Use the transaction.gateway_display_name field on order transactions. Payment methods are no longer categorized into specific types, such as {credit card, debit card, bank transfer} . The legacy Order Printer app mapped only a small subset of currently functioning payment gateways to these categories. Payment gateway providers manage the types of payment methods used by customers on their side. |