Jump to content

Pagebreak PDF Invoice & Delivery


Harry42

Recommended Posts

Hi @all,

is it possible to have a pagebreak after x products in the PDF for the invoice and delivery-slip?
It doesn't matter here if it could be an override or something in the tpl's or in the core in /classes/pdf/.
We are using 1.7.5.1

Best regards,
Harry

Link to comment
Share on other sites

Yes it was easy with a counter like

{assign var=anzahl value=8}
{assign var=umbruch value=$anzahl}
{assign var=zumbruch value=0}


at the top of the invoice.product-tab.tpl or the delivery-slip.product-tab.tpl
And right after {foreach $order_details as $order_detail}
{$zumbruch = $zumbruch + 1}

After the closing </tr> something like this to close the table and open the next table on the next page and get the table-header (here from the delivery-slip.product-tab.tpl):

            {if $zumbruch == $umbruch}
                {assign var=umbruch value=$umbruch + $anzahl}
                </tbody>
                </table>
                <br pagebreak="true" />
                <table class="product" width="100%" cellpadding="4" cellspacing="0">
                    <thead>
                        <tr>
                            <th class="product header small" width="25%">{l s='Reference' d='Shop.Pdf' pdf='true'}</th>
                            <th class="product header small" width="65%">{l s='Product' d='Shop.Pdf' pdf='true'}</th>
                            <th class="product header small" width="10%">{l s='Qty' d='Shop.Pdf' pdf='true'}</th>
                        </tr>
                    </thead>
                <tbody>
            {/if}

Best regards,
Harry

Quote

 

 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...