Professional PDF Invoice Generator for OXID eShop 7.x with automatic email attachment.
Add the private Composer repository to your shop's composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://packeton.markus-michalski.net"
}
]
}
Note: The repository credentials will be provided upon purchase. The credentials are managed via Packeton.
composer require mmd/oxid7-pdf-invoice
When prompted for authentication, enter the credentials provided with your license.
vendor/bin/oe-console oe:module:activate mmd_pdfinvoice
vendor/bin/oe-console oe:cache:clear
Update to the latest version:
composer update mmd/oxid7-pdf-invoice
vendor/bin/oe-console oe:cache:clear
Module configuration in OXID Admin under:
Extensions > Modules > PDF Invoices > Settings
| Setting | Default | Description |
|---|---|---|
| Invoice Prefix | RE- |
Prefix for invoice numbers (e.g., "RE-", "INV-") |
| Reset Yearly | Yes | Reset invoice counter at year start |
| Storage Path | export/invoices |
Directory for PDF files (relative to shop) |
| Setting | Default | Description |
|---|---|---|
| Attach Mode | Customer | Attach invoice to: None / Customer / Owner / Both |
| Auto Generate | Yes | Create invoice automatically on order confirmation |
| Setting | Description |
|---|---|
| Logo Path | Path to logo (relative to out/pictures/). If empty, the shop logo is used. |
| SEPA Creditor ID | Creditor ID for SEPA direct debit invoices |
| Setting | Default | Description |
|---|---|---|
| Debug Logging | Off | Write detailed logs to source/log/ |
Access invoice management in OXID Admin:
Administer Orders > Open Order > Tab "Invoice"
The module includes two customizable templates:
Path: views/twig/pdf/invoice.html.twig
The main PDF template for invoices contains:
To customize the template, copy it to your theme:
source/Application/views/[YOUR_THEME]/twig/modules/mmd_pdfinvoice/pdf/invoice.html.twig
Or create a custom module that overrides the template.
shop.)| Variable | Description |
|---|---|
shop.name |
Shop name |
shop.company |
Company name |
shop.street |
Street |
shop.zip |
Postal code |
shop.city |
City |
shop.country |
Country |
shop.phone |
Phone |
shop.fax |
Fax |
shop.email |
|
shop.vatid |
VAT ID |
shop.taxnumber |
Tax number |
shop.hrb |
Commercial register number |
shop.court |
Registration court |
shop.bank_name |
Bank name |
shop.iban |
IBAN |
shop.bic |
BIC |
shop.creditor_id |
SEPA Creditor ID |
invoice.)| Variable | Description |
|---|---|
invoice.number |
Invoice number |
invoice.date |
Invoice date (formatted) |
invoice.debit_date |
Debit date for SEPA |
order.)| Variable | Description |
|---|---|
order.number |
Order number |
order.date |
Order date (formatted) |
order.currency |
Currency (e.g., "EUR") |
billing.)| Variable | Description |
|---|---|
billing.company |
Company |
billing.salutation |
Salutation |
billing.firstname |
First name |
billing.lastname |
Last name |
billing.street |
Street |
billing.streetnr |
House number |
billing.addinfo |
Additional address info |
billing.zip |
Postal code |
billing.city |
City |
billing.country |
Country |
billing.vatid |
Customer VAT ID |
payment.)| Variable | Description |
|---|---|
payment.name |
Payment method name |
payment.type |
Payment method ID (e.g., oxidpayadvance) |
payment.debit.iban |
Customer IBAN (for direct debit) |
payment.debit.owner |
Account holder (for direct debit) |
payment.mandate_ref |
Mandate reference (for direct debit) |
items)Array with all order items:
| Variable | Description |
|---|---|
item.artnum |
Article number |
item.title |
Article title |
item.selvariant |
Selected variant |
item.amount |
Quantity |
item.nprice |
Unit price (net) |
item.netprice |
Line total (net) |
item.vatpercent |
VAT rate |
totals.)| Variable | Description |
|---|---|
totals.netsum |
Net total |
totals.totalsum |
Grand total (gross) |
totals.delcost |
Shipping costs |
totals.paycost |
Payment costs |
totals.discount |
Discount |
totals.vat_breakdown |
Array with VAT breakdown |
The template automatically displays different payment information based on the payment method:
oxidpayadvance)Please transfer the invoice amount within 7 days to the following account:
[Bank details + reference]
oxidinvoice)Please transfer the invoice amount within 14 days to the following account:
[Bank details + reference]
oxiddebitnote)The invoice amount will be debited on [date] via SEPA direct debit.
Creditor ID: [ID]
Mandate reference: [reference]
To support your own payment method, extend the template:
{% elseif payment.type == 'your_payment_id' %}
<div class="payment-info">
<h4>Payment Information</h4>
<p>Your specific payment information here...</p>
</div>
Important: The payment method ID (payment.type) corresponds to the OXID payment ID from oxpayments.OXID.
When creating an invoice, a snapshot of all relevant data is stored:
Benefit: Even if shop data (e.g., address, bank details) or article data changes later, the invoice remains consistent and can be regenerated identically at any time.
Invoice numbers are generated in the format [Prefix][Year][Counter]:
RE-2025-00001RE-)When enabled, the counter resets automatically on January 1st:
RE-2025-00001, RE-2025-00002, ...RE-2026-00001, RE-2026-00002, ...Continuous numbering across years:
RE-2025-00001, ..., RE-2025-00500RE-2026-00501, RE-2026-00502, ...With auto-generation enabled, the invoice is automatically attached to order confirmation emails:
A separate invoice email can be sent at any time via the admin dashboard. This includes:
The module creates the following tables:
Stores invoice data:
| Field | Description |
|---|---|
OXID |
Unique ID |
OXORDERID |
Order reference |
OXSHOPID |
Shop ID |
INVOICENUMBER |
Invoice number |
INVOICEDATE |
Invoice date |
DATASNAPSHOT |
JSON snapshot of all data |
PDFGENERATED |
PDF created (Yes/No) |
SENTTOCUSTOMER |
Sent to customer |
SENTATCUSTOMER |
Customer send timestamp |
SENTTOOWNER |
Sent to owner |
SENTATOWNER |
Owner send timestamp |
OXTIMESTAMP |
Creation timestamp |
Manages invoice counters:
| Field | Description |
|---|---|
OXSHOPID |
Shop ID |
YEAR |
Year |
COUNTER |
Current counter value |
source/log/out/pictures/Check shop master data in OXID Admin:
Master Settings > Core Settings > Master Data
Bank information is read from shop settings.
Commercial License - Single installation license:
Development and staging environments included. 12 months free updates.
See LICENSE file for complete terms.
For questions and support:
Markus Michalski
Email: support@markus-michalski.net