Packing slip variable reference

Your packing slips are rendered usingLiquid, a template language created by Shopify.

You can make changes to your packing slip templates by clicking theEditbutton in thePacking slipssection of theShipping and deliverypage of your Shopify admin.

Store variables

Use the variables in this table to add details about your store to your packing slip. You can find and edit your store information in theStore detailssettings page of your Shopify admin.

Description of store variables
Variable Description
shop.name
Your store's name.
shop.email
Your store's email address.
shop.domain
Your store's domain.

Store address variables

Use the variables in this table to add your store's address to your packing slip. You can find and edit your address details in theShipping originsection of theShipping and deliverypage of your Shopify admin.

Description of store address variables
Variable Description
shop_address.address1
Your store's address.
shop_address.address2
Your store's apartment or suite.
shop_address.company
Your company name.
shop_address.city
Your store's city
shop_address.province_code
Your store's state or province code. For example, the province code for Ontario is ON.
shop_address.province
Your store's state or province
shop_address.zip
Your store's zip code or postal code.
shop_address.country_code
Your store's country code. For example, the country code for Canada is CA.
shop_address.country
Your store's country.
shop_address.summary
Your store's complete address.

Order variables

Use the variables in this table to add details about the order to your packing slip. You can see a list of orders on theOrderspage of your Shopify admin.

Description of order variables
Variable Description
order.order_number
The order number without any prefixes or suffixes. For example,1004.
order.name
The order number including any prefixes or suffixes set on theStore detailssettingspage of your Shopify admin. For example,#1004.
order.note
与订单相关的注意,如果一个人的存在。
order.created_at
The date and time that the order was created. For example,2009-05-30T17:43:51+02:00. Use thedate filterto change the format.

Customer variables

Use the variables in this table to add your customer's information to your packing slip. You can see a list of orders on theCustomerspage of your Shopify admin.

Description of customer variables
Variable Description
customer.first_name
The customer's first name.
customer.last_name
The customer's last name.
customer.name
The customer's full name.
customer.email
The customer's email.

Customer shipping and billing address variables

Use the variables in this table to add your customer's shipping or billing address to your packing slip. You can see a list of orders on theCustomerspage of your Shopify admin.

Description of customer address variables
Variable Description

shipping_address.address1

billing_address.address1
The customer's address.

shipping_address.address2

billing_address.address2
The customer's apartment or suite.

shipping_address.first_name

billing_address.first_name
The customer's first name.

shipping_address.last_name

billing_address.last_name
The customer's last name.

shipping_address.name

billing_address.name
The customer's full name.

shipping_address.phone

billing_address.phone
The customer's phone number.

shipping_address.company

billing_address.company
The customer's company name for the shipping address.

shipping_address.city

billing_address.city
The customer's city.

shipping_address.province_code

billing_address.province_code
The customer's state or province code. For example, the province code for Ontario is ON.

shipping_address.province

billing_address.province
The customer's state or province.

shipping_address.zip

billing_address.zip
The customer's zip code or postal code.

shipping_address.country_code

billing_address.country_code
Your customer's country code. For example, the country code for Canada is CA.

shipping_address.country

billing_address.country
The customer's country.

shipping_address.summary

billing_address.summary
Your customer's complete address.

Line items in shipment variables

Use the variables in this table to add product details to your packing slip. To see the products in an order, go to theOrderspage of your Shopify admin and click the order number.

Description of line items in shipment variables
Variable Description
line_items_in_shipment

A list of line items that belong together in a shipment. Individual line items can be inside a loop as line_item:

{% for line_item in line_items_in_shipment %} {{ line_item.image }} {{ line_item.title }} ... {% endfor %}

All available attributes of line_item are listed below:

line_item.image- The product's image, if one exists.

line_item.title- The product name. If the product has multiple variants, then the variant name is also included.

line_item.variant_title- The product variant name.

line_item.vendor- The product vendor.

line_item.sku- The product's SKU.

line_item.quantity- The total quantity for that product.

line_item.shipping_quantity- The quantity of that product that is being fulfilled in the shipment.

line_item.properties- The product properties.

includes_all_line_items_in_order

Boolean

Iftrue, then all the items in the order are included in the shipment.

Iffalse, not all items from the order are included in the shipment.

Images

Images are only allowed fromhttps://cdn.myshopify.com/domain. All other images are filtered out. You can include any image that you've uploaded to theFilespage of your Shopify admin.

To add product images or thumbnails to your packing slip, use theline_item.imagevariable.

Packing slip variable examples

The following examples show how you can use some of the packing slip variables.

now

You can use the following format to show the current time and date:

{{"now"|date:"%Y-%m-%d %H:%M"}}

The output is:

2018-09-10 14:23

line_items_in_shipment

Theline_items_in_shipmentvariable displays an array of line items that are included in the shipment.

For example:

{%forline_iteminline_items_in_shipment%}{{line_item.title}}{{line_item.variant_title}}...{%endfor%}

The fields returned in each line_item entry are as follows:

line_item.image line_item.title line_item.variant_title line_item.sku line_item.vendor line_item.quantity line_item.shipping_quantity line_item.properties

You can display images for your line items using the following format:

{%ifline_item.image!=blank%}{{line_item.image|img_url:'58x58'|img_tag}}{%endif%}

You can display the quantity and the shipping quantity for your line items by using the following format:

{{line_item.shipping_quantity}}of{{line_item.quantity}}

For example, this could display:

2 of 5

includes_all_line_items_in_order

You can use this variable to display a message if you are shipping some of the items in an order. For example:

{%unlessincludes_all_line_items_in_order%}There are other items from your order not included in this shipment.{%endunless%}
Ready to start selling with Shopify?Try it free