Shopify's Packing slips will print a separate slip for each fulfillment, but since our app works differently, this option isn't offered by default in Order Printer Pro.
However, we can create a document that prints each fulfillment as a Separate Packing slip, similar to Shopify's default Packing slip button. To accomplish that, we’ll have to loop through all fulfillment objects. If there is only one fulfillment, a single packing slip will appear.
Instructions
This is a slightly different version of the template code attached at the end of the page.
Find the opening template tag that contains all the Packing Slip contents. You can spot it with the words “
class="template-
”:Contract the entire
<div class="template-000000">
tag, and surround it with the following fulfillment loop:{% for fulfillment in fulfillments %}
{% assign name = fulfillment.name %}
{% assign created_at = fulfillment.created_at %}
<!-- Packing Slip Contents -->
{% else %}
<div class="order-table">
<div class="order-table-row order-table-body">
<p>{{ TEXT_order }} {{ name }}</p>
<p>{{ TEXT_no_items_fulfilled }}</p>
</div>
</div>
{% endfor %}Now, inside the template contents, find the line:
{% for line_item in line_items %}
And replace it with:
{% for line_item in fulfillment.line_items %}
Finally, you must add the following CSS rule inside the style tag.
.template-000000:not(:first-of-type) {
page-break-before: always;
}
Note: Make sure to replace the “template-00000
” class with your template’s value.As a bonus, you may add this paragraph in the order details, which will display the fulfillment “index”:
<p>
<b>Fulfillment {{forloop.rindex}} of {{forloop.length}}</b>
</p>
Sample Template
We've created a sample template that you can paste into your Order Printer Pro app, displaying a separate slip for each fulfillment in an order. You may copy the one on the bullet below or download the attached file; it's the same code.