Migrate from the Order Printer app to Shopify Order Printer
The Liquid implementation in Shopify's Order Printer slightly differs from the original Order Printer. To migrate your templates, you'll need to manually copy the code from your existing templates, paste them into the new app, and make the necessary adjustments as outlined in this guide. Any custom CSS added to your templates will also need to be transferred and adjusted in the new app.
On this page
Order attributes being removed from the global namespace
To access order attributes, prepend them with order.
. For instance, billing_address
is now accessed as order.billing_address
.
For your convenience, several commonly used order attributes are still accessible without the order.
prefix:
-
line_items
-
tax_lines
-
fulfillments
-
transactions
-
discounts
-
refunds
-
shipping_methods
-
customer
These variables can be accessed either as fulfillments
or order.fulfillments
, and so on.
Fields deprecations
In accordance with the up-to-date Shopify data model, multiple fields on several objects were renamed or deprecated with a replacement or a workaround provided in the paragraphs below. If your templates access any of them, then replace them with the provided replacement fields or code fragments.
Order
Implementation differences:
-
line_items
. Refunded line items aren't included in the line_items collection. Access refunded line items throughrefunds.<each>.refunded_line_items
.
Fields deprecated with replacements given:
-
credit_card
. Use payment details based on each transaction from the order:transactions.each.payment_details
. -
current_shipping_price
. Useshipping_price
instead. -
date
. Usecreated_at
instead. -
gateways
. Useunique_gateways
ortransactions.<each>.gateway
instead. -
order_currency
. Usecurrency
instead. -
processed_at
. Usecreated_at
instead. -
payment_transactions
. Filter downorder.transactions
for kind and status in the Liquid syntax with where or with looping and anif
inside. -
refund_transactions
. Filter downorder.transactions
for kind and status in the Liquid syntax with where or with looping and anif
inside. -
shipping_line
. Useshipping_methods | first
. -
shipping_lines
. Useshipping_methods
. -
show_line_item_taxes
. Dotax_lines.size > 0
. You can define it as a variable in the beginning of the template and refer multiple times:{% assign show_line_item_taxes = tax_lines.size > 0 %}
. -
total_tax
. Usetax_price
. -
total_paid
. Usenet_payment
.
LineItem
Fields deprecated with replacements given:
-
fulfillable_quantity
. Usequantity - successfully_fulfilled_quantity
. -
fulfilled
. Calculatequantity == successfully_fulfilled_quantity
condition. -
name
. Usetitle
. -
product_title
. Useproduct.title
. -
unit_discount
. Calculatequantity ? total_discount / quantity : 0
. -
variant_title
. Usevariant.title
. -
weight
. Usegrams
.
Fulfillment
Fields deprecated with replacements given:
-
date
. Usecreated_at
.
Shop
Fields deprecated with replacements given:
-
owner
- Useaccount_owner.name
.
For the following fields, refer them as shop.address.<field_name>
:
-
address
- Useshop.address.address1
. -
address2
- Useshop.address.address2
. -
city
- Useshop.address.city
. -
country
- Useshop.address.country
. -
country_code
- Useshop.address.country_code
. -
province
- Useshop.address.province
. -
province_code
- Useshop.address.province_code
. -
zip
- Useshop.address.zip
.
Address
Fields deprecated with replacements given:
-
latitude
- ifaddress
was referenced fromlocation
, latitude and longitude are available on thelocation
object itself. -
Longitude
- ifaddress
was referenced fromlocation
, latitude and longitude are available on thelocation
object itself.
Refund
Fields deprecated with replacements given:
-
date
. Usecreated_at
.
ShippingLine
Fields deprecated with replacements given:
-
current_price
. Useprice
. -
price
. Useoriginal_price
.
Transaction
Removed fields:
-
authorization
-
message
-
test
Variant
Fields deprecated with replacements given:
-
grams
. Useweight
.
Filters deprecations
Fields deprecated with replacements given:
-
files_url
. Usefile_url
. -
payment_method
,payment_methods
. Use transaction.gateway_display_name field on order transactions. Payment methods are no longer categorised into specific types such as{credit card, debit card, bank transfer}
. The older Order Printer 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.