Introduce Custom/New liquid variables to use in packing slip

Highlighted
New Member
3 0 0

Hi,

I have explored on packing slip templates.Currently we can make our own template using liquid variables to populate customer, shipping or order details etc.

But if we want to add some extra information about product for specific order, can we introduce new liquid variable, which can take value while we print packing slip?

0 Likes
Highlighted
Shopify Partner
28 4 10

Here is the list of available Liquid variables for Packing Slips: https://help.shopify.com/en/manual/orders/packing-slips-variable-list. I see that you can get only Store, Order, or Customer specific Liquid variables. 

If you want to include some extra data, that is coming from the order, like some properties, or specific string data, you can use custom line items: https://help.shopify.com/en/manual/orders/packing-slips-variable-list#line-items-in-shipment-variabl..., forloop with line_item.properties, inside of the {% for line_item in line_items_in_shipment %} loop, like this:

{% for prop in line_item.properties %}
          {{ prop }}<br>
{% endfor %}

Those properties are line_items from an order https://shopify.dev/docs/themes/liquid/reference/objects/line_item#line_item-properties

By this, you will get them in your printed doc.

Besides this option, I can see no ways to pass extra data to the Packing slip.

 

0 Likes
Highlighted
New Member
3 0 0

Thank you for the reply.

Custom line items are something, which we can use to take extra information from the buyer.

But as a seller, if we want to include extra information while printing packing slip or while fulfilling order for that specific order, can we do that ?

0 Likes
Highlighted
Shopify Partner
28 4 10

Could you tell more from what source you want to take that information, and at what stage? 

0 Likes
Highlighted
New Member
3 0 0

One specific case would be, while printing packaging slip, we may want to add extra information about  the product only for that specific order

0 Likes
Highlighted
Shopify Partner
28 4 10

Templates gonna work for all of the packaging slips. 

1. You can mark some products with tags in order to be able to add a markup to some specific products.

2. In the packaging slip template you can get https://shopify.dev/docs/themes/liquid/reference/objects/line_item#line_item-product and by this, you should be able to grab https://shopify.dev/docs/themes/liquid/reference/objects/product object.

3.Then you can check tag existence with product.tags forloop, and then you can try to get any of the https://shopify.dev/docs/themes/liquid/reference/objects/product options. 

0 Likes