PS PrestaShop Beginner

DataFirefly PDF Invoice Editor for PrestaShop

Install the module, set the logo, columns, custom fields, legal mentions by country, due date and SEPA QR code, then check the invoice with the preview.

Updated Module version 1.1.0

Overview

The dfinvoiceeditor module replaces the layout of PrestaShop 8 and 9 PDF invoices with your own, set from the back office. It edits no .tpl file and installs no override: when PrestaShop generates an invoice, the module supplies its own header, body and footer. Disabling the module or its main switch brings back the original invoice.

The settings apply to every invoice PrestaShop produces: the invoice attached to order e-mails, the one downloaded from the customer account, and invoices printed individually or in bulk from the back office. Optionally, delivery slips get the same presentation.

The same invoice printed by PrestaShop (left) and by the invoice editor (right): logo, seller block, summary bar, VAT breakdown and bank details
PrestaShop invoice before and after

Installation

  1. In Modules > Module Manager, click Upload a module and send the dfinvoiceeditor-1.1.0.zip file.
  2. The module creates its settings table, the img/dfinvoiceeditor folder for the logo and the Orders > Invoice editor page.
  3. Open that page. The module layout is active from installation with plain default settings: generate a preview to see it.

The module runs on PrestaShop 8.0 to 9.x, in multistore (settings per shop) and multilingual setups. No Composer dependency is required.

Updating to version 1.1.0

Upload dfinvoiceeditor-1.1.0.zip in the Module Manager, then click Upgrade. Settings, texts, custom fields, rules and the logo are kept as they are. Version 1.1.0 fixes:

  • Polish, Czech or Turkish characters replaced by “?” when the employee downloading the invoice works in another language than the order;
  • the tax breakdown of an exempt invoice (reverse charge, export), which showed only the shipping as base;
  • combinations in the PrestaShop 8 and 9 format, cut in the middle of the parentheses;
  • the footer, printed on the last page only, which repeated the previous invoice’s footer in a bulk export;
  • the customer country and customization labels, now in the invoice language.

The editor

The page is split into sections listed in the left column. Below the list, a sketch of an A4 page highlights the part of the invoice you are editing. The bar at the bottom shows whether changes are unsaved and holds the Save button.

Printed texts exist in every shop language. The language pills below the header choose which language is shown in all multilingual fields.

Preview and comparison

At the top of the page, pick a recent invoice of the shop, then Invoice or Delivery slip:

  • Preview opens the PDF in a new tab with the settings on screen, even unsaved. Only a newly uploaded logo waits for saving.
  • Compare with the PrestaShop invoice opens the same document in the original layout.

General settings

  • Use this layout for invoices: the main switch. When off, PrestaShop prints its own invoice again, and no setting is lost.
  • Also use this layout for delivery slips: see Delivery slips below.
  • Invoice language: the order language (recommended) or that of the employee generating the PDF.
  • Font: automatic per language, Helvetica, DejaVu Sans, Times or Courier. DejaVu Sans also covers Polish, Greek and Cyrillic. The automatic font follows the invoice language, even when the employee downloading it works in another language.
  • Text size from 7 to 12 pt and four colors: accent (title, table header, total to pay, section titles), text, secondary text and text on the accent color.
PrestaShop invoice editor, General section: layout enabled, invoice language, automatic font per language, text size and colours
Invoice editor: general settings

Choose the shop invoice logo, a logo dedicated to invoices or no logo. The dedicated logo accepts PNG, JPG or GIF up to 2 MB; a PNG at least 600 px wide prints sharply. Set its width from 10 to 90 mm and its position left or right. The height is capped at 26 mm so the header never overlaps the content.

Header and logo: logo used only on invoices, logo width and position, invoice date under the number
Invoice header and logo

Addresses and summary

The seller block is free text with placeholders, by default {shop_name}, {shop_address} and {shop_details} (the details from Shop Parameters > Contact). Billing and delivery addresses use the country address format; the delivery address can be hidden when it matches the billing address. The module compares the addresses as they print (company, name, street, postcode, city, country), ignoring phone, VAT number and DNI, so the same address saved twice by the customer is hidden too. The customer VAT number, phone and e-mail are optional.

Where to print the seller block: in the address row (default) or under the logo, in the header. Under the logo, the block shares the roughly 35 mm PrestaShop reserves for the header. The module measures the text on each invoice and gives the logo the remaining height, never less than 12 mm. When the block is too long, it is set on two columns under the logo, then in a smaller size. No line is cut. In the rare case where two columns are not enough, the logo keeps its size and the block prints right under the header, at the top of the first page. To keep a large logo, use {shop_address_inline}, which fits the address on a single line. The text printed at the bottom of every page is the module footer, set separately in the Footer section.

The summary bar, a tinted band under the addresses, shows any of: order reference and date, payment, due date, carrier and tracking number, plus custom fields placed in the bar.

Addresses and summary: seller block with company name, address, registration and VAT numbers, billing and delivery addresses, summary bar
Seller block and addresses

Product lines

The table lists the 12 available columns: image, reference, name, EAN-13, supplier reference, unit price excl. tax, unit price incl. tax, discount, tax rate, quantity, total excl. tax, total incl. tax. For each one, tick printing, edit the title in each language, set the relative width and alignment, and change the order with the arrows. The strip above shows how widths are shared; they are scaled to fill the page.

  • Combinations (“Size: M, Color: Blue”) move to a second, smaller line. Both PrestaShop name formats are recognised: “T-shirt (Size: M – Color: Blue)” as well as “T-shirt – Size: M – Color: Blue”.
  • Customizations entered by the customer print under the product name.
  • The product thumbnail measures 6 to 25 mm.
  • Line under each row, full grid or no border; optional alternate row shading.
  • Column titles repeat at the top of each page of a long invoice.
Product lines: choose, order and size the invoice columns (reference, product, unit price, VAT, quantity, total)
Invoice product line columns

Totals

  • Tax breakdown by rate: base and amount per rate, with products, shipping, gift wrapping and ecotax grouped. An invoice without tax (reverse charge, export) shows a single 0% line on its whole taxable amount.
  • Discounts: the names of the vouchers and cart rules applied print under the discount line, as on the PrestaShop invoice.
  • Hide zero lines for discount and gift wrapping.
  • List the payments received with method, amount and date.
  • Content added by other modules: what other modules add to invoices through the displayPDFInvoice hook is still printed, after the totals, after the product lines, or hidden.

Payment and due date

Due date and amount due

Payment terms in days after the invoice date print the due date in the summary bar and fill the {due_date} placeholder. Leave 0 to print no due date.

When an invoice is partly paid, the Already paid and Amount due lines appear under the total incl. tax. The paid amount is the sum of the payments linked to the invoice in PrestaShop. The optional Paid stamp prints under the totals once the invoice is settled.

Bank details and SEPA QR code

Choose when to print the bank block: never, only when an amount is due, or always. Fill in the account holder (the shop name when empty), bank name, IBAN, BIC and payment reference, by default {invoice_number}. The IBAN is checked with its check digits: a wrong IBAN is flagged and blocks saving.

The SEPA QR code (EPC069-12 format) holds the beneficiary, IBAN, BIC, amount still due and reference. The customer scans it with their banking app and the transfer is prefilled. It prints only on invoices in euros and only when an amount remains due.

Payment and due date: payment terms in days, paid stamp, bank details (IBAN, BIC) and SEPA QR code with the amount due
Due date, IBAN and SEPA QR code

Custom fields

Add as many fields as you need: purchase order number, customer registration number, payment terms, customer message. Each field has:

  • a label and content in each language, with bold, italic and underline;
  • a position: summary bar, under the addresses, under the product lines, under the totals or in the footer;
  • a Print on choice: invoices, delivery slips or both;
  • the option Hide when its placeholders are empty, handy for SIRET: {customer_siret};
  • print conditions (see below).

The Placeholders panel inserts a placeholder into the last edited field. Placeholders cover the shop (name, address, e-mail, phone, details), the order and invoice (number, dates, due date, amount due, payment, carrier, tracking, delivery slip number, currency) and the customer (name, company, e-mail, VAT number, SIRET, APE, DNI, phones, message left at checkout).

Custom fields: payment terms in the summary bar for companies only, and a text under the totals, each with its print conditions
Conditional custom fields

Each rule holds a text per language and conditions. Every rule matching the invoice is printed, in list order, in a frame under the totals or in the footer.

Conditions

  • Destination: all countries, shop country, European Union, EU except shop country, outside the EU, or a list of countries. Click a country to select or remove it.
  • Customer: any, with or without VAT number, company or individual.
  • Tax on the invoice: with or without tax.

The country used for the rules defaults to the address PrestaShop uses to compute taxes; you can force the billing or delivery address.

Example rules

Four rules are installed inactive: exempt intra-Community supply (Article 138 of Directive 2006/112/EC, with the customer VAT number), EU B2B services under reverse charge (Article 196, added in 1.1.0 for new installations and after “Restore default settings”), export outside the EU (Article 146) and French B2B late payment terms (penalties and fixed 40 EUR recovery fee). Have your accountant check the wording before enabling them.

With DataFirefly VIES B2B, the reverse charge mention with the VIES consultation number is already printed by that module on exempt invoices, in the “Content added by other modules” block. Keep the EU example rules disabled so that it does not print twice: the editor shows a reminder when VIES B2B is active.

Legal mentions by country: example rules for EU exempt supply, reverse charge on services and exports, with destination, customer and tax conditions
Legal mentions by country
B2B PDF invoice issued without VAT: 0% VAT breakdown, paid stamp, bank details and reverse charge mention with the VIES consultation number (fictitious company)
B2B reverse charge invoice

The footer text prints at the bottom of every page, by default {shop_name}, {shop_address_inline}. Keep it to three lines: PrestaShop reserves little space for the footer, long texts belong in a custom field under the totals. The legal free text and footer text from Orders > Invoices can be added.

The footer, with the legal mentions and custom fields placed in it, prints on every page of the invoice. In a bulk export, each invoice keeps its own footer.

Footer: company legal information printed at the bottom of every page, with the legal texts of Orders > Invoices
Invoice footer

Wording

The Wording section lists every word printed on the invoice: title, number, dates, address titles, totals, tax breakdown, due date, bank details, delivery slip texts. They are prefilled in English, French, Spanish, German, Italian, Dutch, Polish and Portuguese, and editable in each language.

Delivery slips

Enable Also use this layout for delivery slips in the general settings. The delivery slip reuses the logo, colors, addresses, summary bar and product lines, without any price: only the image, reference, name, EAN-13, supplier reference and quantity columns are printed. Totals, bank details, legal mentions and invoice legal text do not appear. The header shows the slip number, its date and the invoice number.

Backup and transfer

Export the settings downloads a JSON file with all the shop settings, texts included. Texts are keyed by language code, so the file imports into another shop or installation even when language IDs differ. The logo is not included. Import replaces all settings of the current shop after confirmation.

Restore default settings, in the bottom bar, resets every setting and text while keeping the uploaded logo.

Troubleshooting

The preview says the editor could not take over

The message after that sentence gives the cause, also written in Advanced Parameters > Logs. In that case PrestaShop produces its original invoice: no invoice is ever blocked.

An employee gets the original invoice

PrestaShop skips a module’s hooks when the logged-in employee’s profile lacks the View permission on that module. Grant it in Advanced Parameters > Team > Permissions > Modules. Invoices sent to customers and downloaded from their account are not affected.

Shorten the footer text, move long mentions to a custom field under the totals, or choose the “Framed under the totals” position for legal mentions. Beyond three lines, the page number moves below the bottom margin PrestaShop reserves for the footer.

The QR code does not appear

Check that the bank block is enabled, the IBAN is saved, the invoice is in euros and an amount remains due. In “Always” mode, a settled invoice shows the bank details without a QR code.

The delivery address still shows although it looks identical

The two addresses differ on at least one printed item: company, second address line, postcode, state or spelling of the street. Case, spaces and punctuation are ignored. Open the order in the back office to compare both addresses.

A setting seems to have no effect on the preview

Some items only print when the invoice holds the information: customer VAT number, tracking number, amount due on a partly paid invoice, Paid stamp on a settled invoice, due date with payment terms above 0 days, discount and gift wrapping lines at zero. Pick an invoice holding that information at the top of the editor to check the setting.

Credit slips keep the old layout

The module covers invoices and delivery slips. Credit slips keep the PrestaShop layout.

Was this page helpful?

Still stuck? Contact support