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.
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.
Installation
- In Modules > Module Manager, click Upload a module and send the
dfinvoiceeditor.zipfile. - The module creates its settings table, the
img/dfinvoiceeditorfolder for the logo and the Orders > Invoice editor page. - 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.
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.
- 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.
Header and logo
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.
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 customer VAT number, phone and e-mail are optional.
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.
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.
- 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.
Totals
- Tax breakdown by rate: base and amount per rate, with products, shipping, gift wrapping and ecotax grouped.
- 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
displayPDFInvoicehook 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.
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).
Legal mentions by country
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
Three rules are installed inactive: exempt intra-Community supply (Article 138 of Directive 2006/112/EC, with the customer VAT number), 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.
Footer
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.
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.
The footer overlaps the content
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.
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.
Credit slips keep the old layout
Version 1.0.0 covers invoices and delivery slips. Credit slips keep the PrestaShop layout.