Skip to main content

How can I customize the documents for my supplier orders?

Shopware 6 — Customize the PDF layout and CSV columns of your supplier orders. Configure logo, contact details and document format per Sales Channel.

In this article, we explain how you can customize your supplier order documents. In general, you can export your supplier orders from the Shopware Admin as a PDF document or as a CSV file, or send them automatically by email.

Sending emails for supplier orders

Under Settings → Extensions → Pickware ERP you can define BCC recipients for the supplier order email in the Supplier orders section.

Lieferantenbestellung_Mailempfänger.png

Customizing the CSV file

Under Settings → Extensions → Pickware ERP you can select in the Supplier orders section which columns the CSV file should contain and in which order. Please note that these settings only apply to sending supplier orders by email.

For the export from a single supplier order, you define the columns in the order itself: Under Bestellpositionen (Order items), click Listeneinstellungen (List settings) and show the EAN there, for example, or change the order of the columns. Columns that are shown are also included in the export.

Lieferantenbestellung_CSV.png

What is shown on the PDF document?

The PDF document contains no purchase prices and no total. The prices appear only in the CSV file of the supplier order. There is no setting to show prices on the PDF document.

If you want to show the manufacturer number instead of the supplier product number, for example, you customize the template file. You can read how to do this further below under Customizing the template file.

The line items on the PDF document are sorted by product number. There is no setting for a different sorting. The date shown on the document is always the day you download the PDF, not the order date.

Editing the template for the PDF document

Configuration settings in the Shopware Admin

Under Settings → Documents → pickware_erp_supplier_order you will find the settings for the PDF template of the supplier orders. There you can add your company logo and your company's contact details and set the alignment of the PDF file.

If the document shows an outdated email address or other contact details are no longer up to date, you change them here in the document settings. The information on the document does not come from the master data of your Pickware account.

You can also create the document configuration for supplier orders per Sales Channel. Under Settings → Documents you can configure a separate supplier order document (pickware_erp_supplier_order) for each Sales Channel, with its own logo, its own billing address and its own company information.

In the VAT Id and Steuernummer (Tax number) fields you can enter the respective tax details for the Sales Channel — fields that are not filled in are not shown on the document. If you then link a supplier order to the corresponding Sales Channel, this information is automatically used on the order document.

In the Geschäftsadresse (Business address) field you can enter your company address. It appears at the top right or above the destination address on the document. For the line breaks to be placed in the right spot, you must enter it in the following format:

Leerzeichen Bindestrich Leerzeichen Straße 12 Leerzeichen Bindestrich Leerzeichen 12345 Ort

Geschaeftsadresse_Eingabe.png

The address is then displayed on the document as follows:

Geschaeftsadresse_Ausgabe1.png

Geschaeftsadresse_Ausgabe2.png

Customizing the warehouse address

The supplier order shows the corresponding warehouse address. You can customize the warehouse address under Warehousing → Warehouses and bin locations by selecting the respective warehouse and entering your warehouse's address in the Address section of the Overview tab.

Customizing the template file

You can also make further customizations to the PDF template for supplier orders.

Note that, unlike the Shopware default, the Pickware templates consist of only a single block, so it has to be overwritten completely. You can find more information on this here at Shopware.

It does not matter in which theme you overwrite the file, as there is no connection to customer orders or Sales Channels here. Shopware loads the plugins and themes in the order of their installation date, and then the respective twig files. So you can use any theme or, if necessary, create your own theme just for this purpose; the only important thing is that it is Active.

If you decide on your own theme, you can create it with Shopware CLI:

bin/console theme:create DeinTheme

bin/console plugin:install --activate DeinTheme

In the desired theme, you can then create the template file supplier-order.html.twigin the following directory:

/custom/plugins/DeinTheme/src/Resources/views/documents/supplier-order.html.twig

You can use the following code as a template for your customization:

// supplier-order.html.twig{% sw_extends '@PickwareErpStarter/documents/supplier-order.html.twig' %}{% block document_body %}// Original Inhalt{% endblock %}

You can find our template for copying the content in the plugin folder under

PickwareErpStarter/vendor/pickware/erp-bundle/src/Resources/views/documents/supplier-order.html.twig

You can find out how to add an individual text per supplier in the supplier email via the template here.

Background image for documents

Under Background image in the document settings, you can add an image that is displayed across the full page of the supplier order document. This lets you carry your corporate design over to the document, for example.

To do this, select an image from the media uploaded in Shopware.

Please be sure to note the following:

  • The image is stretched across the entire page. Therefore, use an image with the aspect ratio of A4 portrait (210 × 297 mm). For good display quality, we recommend a resolution of at least 1240 × 1754 pixels (150 DPI), ideally 2480 × 3508 pixels (300 DPI).

  • The image must not be fully opaque, as otherwise the text on the document will no longer be legible. Therefore, use an image with a transparent or very light background.

Did this answer your question?