Shopify Report Page Breaking help!

BecB
New Member
1 0 0

Hi,

I am trying to create a report, that prints the date, order number & shop at the top, then prints one page for each line item on the order, so that our production team can print dockets for each item on the order that needs to be made.

It needs to repeat the header information on each page, and one item line on each page, so if there were 5 different items on an order, there would be five dockets. This is what I have so far, but I can't make it page break after each line item.

I also have no clue how to repeat the header on each page either...

Help please! Thank you in advance.

 

<div class="divheader">
<b>ORDER DOCKET</b><br/><br/>
Order Date: {{ processed_at | date: "%d/%m/%y" }} <br />
Order Number: {{ order_name }} <br />
Customer: {{ customer.name }}</p>
<hr />
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Quantity</th>
<th>Item</th>
</tr>
</thead>
</div>
<tbody>
{% for line_item in line_items %}
<tr>
<div class="linecontent">
<td>{{ line_item.fulfillable_quantity }} x</td>
<td><b>{{ line_item.title }}</b></td>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>


{% if note %}
<h3 style="margin: 0 0 1em 0; color: red;">Order Notes</h3>
<p style="background-color: #FFFF00;">{{ note }}</p>
{% endif %}

<style>
.divheader {
text-align: center;
margin: 0 0 0 0;
width: 100%;
align-items: top;
margin-bottom: 30px;
}

.linecontent {
page-break-after: always;
}
</style>

 

 

0 Likes