From 9edbaf8adf8da751b7a84f9bf5e6138fc756e332 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 09:13:18 +0200 Subject: [PATCH] use class alias, extend documentation --- IntelliSenseHelper.php | 16 ------- .../Model/d3_Order_PDFDocsCompat.php | 8 ++++ README.md => README.de.md | 2 +- README.en.md | 44 +++++++++++++++++++ metadata.php | 4 +- 5 files changed, 55 insertions(+), 19 deletions(-) delete mode 100644 IntelliSenseHelper.php rename README.md => README.de.md (94%) create mode 100644 README.en.md diff --git a/IntelliSenseHelper.php b/IntelliSenseHelper.php deleted file mode 100644 index 7fbc402..0000000 --- a/IntelliSenseHelper.php +++ /dev/null @@ -1,16 +0,0 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\PdfDocumentsCompat\Modules\Application\Model -{ - use OxidEsales\Eshop\Application\Model\Order; - - class d3_Order_PDFDocsCompat_parent extends Order {} -} \ No newline at end of file diff --git a/Modules/Application/Model/d3_Order_PDFDocsCompat.php b/Modules/Application/Model/d3_Order_PDFDocsCompat.php index b120dcb..81788ca 100644 --- a/Modules/Application/Model/d3_Order_PDFDocsCompat.php +++ b/Modules/Application/Model/d3_Order_PDFDocsCompat.php @@ -15,8 +15,16 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf; use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf; use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; +use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\Registry; +if (false) { + class_alias( + d3_Order_PDFDocsCompat_parent::class, + Order::class + ); +} + class d3_Order_PDFDocsCompat extends d3_Order_PDFDocsCompat_parent { public function setSelectedLang($iLang) diff --git a/README.md b/README.de.md similarity index 94% rename from README.md rename to README.de.md index df9e077..0f37982 100644 --- a/README.md +++ b/README.de.md @@ -12,7 +12,7 @@ Das Adminformular zur Dokumentengenerierung wird hierin nicht nachgebaut, da die ## Systemanforderungen: -- installierter OXID eShop in Version 6 +- installierter OXID eShop ab Version 6.1 - D3 PDF Dokumente Modul (wird ggf. nachinstalliert) - PHP-Version, für die Installationspakete verfügbar sind (PHP 7) - Installation via Composer diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..58e2557 --- /dev/null +++ b/README.en.md @@ -0,0 +1,44 @@ +# PDF Documents - compatibility layer + +Compatibility Layer for PDF Documents Module to OXID InvoicePDF Module + +This customization allows third party modules that would otherwise use the OXID InvoicePdf module for their own purposes, to use the D3 PDF Documents module instead. + +The generation call of the standard documents (invoice, delivery note) is routed via the PDF Documents module. + +If further documents have been added, the routing must be added there. + +The admin form for document generation is not copied here, because it is already included in the PDF Documents module in a similar form. Adjustments (e.g. template block overloads) should be adapted to this. + +## System requirements: + +- installed OXID eShop from version 6.1 +- D3 PDF Documents Module +- PHP version for which installation packages are available (PHP 7) +- Installation via Composer + +## compatibility: + +The module contains the same functionality as the `OXID Invoice PDF` module. Since it is intended to replace its function, the OXID module is uninstalled. + +## Installation + +Disable the OXID InvoicePDF module in the admin area of your shop. + +```bash +composer require d3/pdfdocuments_compat --update-no-dev +``` + +Delete the files of the OXID InvoicePDF module. + +## Support: + +- D3 Data Development (Inh. Thomas Dartsch) +- Home: [www.d3data.de](https://www.d3data.de) +- E-Mail: support@shopmodule.com + +## License + +This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. + +Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file diff --git a/metadata.php b/metadata.php index 9b637e4..7faa1b4 100644 --- a/metadata.php +++ b/metadata.php @@ -14,7 +14,7 @@ use OxidEsales\Eshop\Application\Model\Order as Order; /** * Metadata version */ -$sMetadataVersion = '2.0'; +$sMetadataVersion = '2.1'; $logo = '(D3)'; @@ -28,7 +28,7 @@ $aModule = [ 'de' => $logo.' PDF-Dokumente Kompatibilitätsschicht', 'en' => $logo.' PDF documents compatibility layer', ], - 'version' => '0.1', + 'version' => '1.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/',