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.
On this page
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.
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.
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.
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.
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.
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.
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:
|
includes_all_line_items_in_order |
Boolean If If |
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.image
variable.
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:
The output is:
line_items_in_shipment
Theline_items_in_shipment
variable displays an array of line items that are included in the shipment.
For example:
The fields returned in each line_item entry are as follows:
You can display images for your line items using the following format:
You can display the quantity and the shipping quantity for your line items by using the following format:
For example, this could display:
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: