PDF Invoices: Installation
Installing the PDF Invoices module for OXID eShop 7.x via Composer, activation, directory permissions, update and behavior on deactivation.
PDF Invoices: Installation
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
This documentation always describes the latest published version.
Requirements
| Requirement | Note |
|---|---|
| OXID eShop | 7.x (oxid-esales/oxideshop-ce ^7.0) |
| PHP | 8.2 or newer |
| PDF library | Dompdf (dompdf/dompdf ^2.0), installed automatically by Composer |
Installation via Composer
The module depends on Dompdf and uses the Composer autoloader, so it is installed through Composer.
Private repositories are managed via Packeton. You receive the credentials after purchasing the license.
1. Add the private repository:
{
"repositories": [
{
"type": "composer",
"url": "https://packeton.markus-michalski.net"
}
]
}
2. Install the module:
composer require mmd/oxid7-pdf-invoice
Composer asks for the credentials of your license when fetching the package. The module ends up in source/modules/mmd/pdf-invoice.
3. Activate the module:
vendor/bin/oe-console oe:module:install-configuration source/modules/mmd/pdf-invoice
vendor/bin/oe-console oe:module:activate mmd_pdfinvoice
vendor/bin/oe-console oe:cache:clear
Alternatively, activate the module in the OXID admin under Extensions > Modules.
What happens on activation
- The tables
mmd_pdfinvoiceandmmd_pdfinvoice_seqare created if they do not exist yet. - The directory
export/invoicesis created in the shop directory (source/). It contains an.htaccesswithDeny from all. - The invoice counter for the current year is created for shop 1. For other shops and years the counter is created with the first invoice.
Directory permissions
The web server user needs write access to:
| Directory | Purpose |
|---|---|
source/export/invoices (or your own storage path) |
Storage of the PDF invoices |
source/tmp/dompdf |
Dompdf font cache, created on the first PDF creation |
Update
composer update mmd/oxid7-pdf-invoice
vendor/bin/oe-console oe:cache:clear
Existing invoices, counters and PDF files are kept during an update. If you customized the template, see the note on the Template and Variables page.
Deactivating and removing
Deactivating the module deletes neither the tables nor the PDF files. Removing the module via Composer does not delete the tables or the files in the storage path either. If you want to remove the data you have to delete tables and files yourself. Keep the retention periods for invoices in mind.
Next steps
- Configuration: settings and admin area
- Template and Variables: customize the invoice layout