diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
index 15270eb..d0e9c8c 100644
--- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
+++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
@@ -11,7 +11,6 @@
namespace D3\PdfDocuments\Application\Model\AbstractClasses;
use Assert\InvalidArgumentException;
-use D3\ModCfg\Application\Model\d3filesystem;
use D3\PdfDocuments\Application\Model\Constants;
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
@@ -26,6 +25,8 @@ use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateEngineInterf
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRenderer;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
use OxidEsales\Twig\Resolver\TemplateChain\TemplateNotInChainException;
+use Psr\Container\ContainerExceptionInterface;
+use Psr\Container\NotFoundExceptionInterface;
use Smarty;
use Spipu\Html2Pdf\Exception\Html2PdfException;
use Spipu\Html2Pdf\Html2Pdf;
@@ -185,37 +186,12 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
unset($iSelLang);
$this->oTemplateEngine->addGlobal('config', Registry::getConfig());
- $this->oTemplateEngine->addGlobal('sAlternativePdfLogo', $this->getAlternativePdfLogoFileName());
$this->oTemplateEngine->addGlobal('oViewConf', Registry::getConfig()->getActiveView()->getViewConfig());
$this->oTemplateEngine->addGlobal('shop', Registry::getConfig()->getActiveShop());
$this->oTemplateEngine->addGlobal('lang', Registry::getLang());
$this->oTemplateEngine->addGlobal('document', $this);
}
- /**
- * @return string
- */
- public function getAlternativePdfLogoFileName() :string
- {
- $sStandardLogoFile = 'pdf_logo.jpg';
- $oViewConf = Registry::getConfig()->getActiveView()->getViewConfig();
- $moduleSettingService = ContainerFacade::get(ModuleSettingServiceInterface::class);
- $sAlternativePdfLogoName = $moduleSettingService->getString(Constants::OXID_MODULE_ID."_sAlternativePdfLogoName", Constants::OXID_MODULE_ID);
-
- $sAlternativePdfLogoName = trim($sAlternativePdfLogoName) ?: $sStandardLogoFile;
-
- $bAlternativeFileExists = file_exists(Registry::getConfig()->getImagePath($sAlternativePdfLogoName));
- $bFileExists = file_exists(Registry::getConfig()->getImagePath($sStandardLogoFile));
-
- return $bAlternativeFileExists
- ? $oViewConf->getImageUrl($sAlternativePdfLogoName, true)
- : (
- $bFileExists
- ? $oViewConf->getImageUrl($sStandardLogoFile, true)
- : ""
- );
- }
-
/**
* @param int $iSelLang
*
@@ -322,14 +298,68 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/**
* Gets proper file name
*
- * @param string $sFilename file name
+ * @param $filename
*
* @return string
*/
- public function makeValidFileName($sFilename)
+ public function makeValidFileName($filename)
{
- $fs = oxNew(d3filesystem::class);
- return $fs->filterFilename($sFilename);
+ // sanitize filename
+ $filename = preg_replace(
+ '~
+ [<>:"/\\\\|?*]| # file system reserved
+ [\x00-\x1F]| # control characters
+ [\x7F\xA0\xAD]| # non-printing characters DEL, NO-BREAK SPACE, SOFT HYPHEN
+ [#\[\]@!$&\'()+,;=]| # URI reserved
+ [{}^\~`] # URL unsafe characters
+ ~x',
+ '-',
+ $filename
+ );
+
+ // avoids ".", ".." or ".hiddenFiles"
+ $filename = ltrim($filename, '.-');
+
+ $filename = $this->beautifyFilename($filename);
+
+ // maximize filename length to 255 bytes
+ $ext = pathinfo($filename, PATHINFO_EXTENSION);
+ $filename = mb_strcut(
+ pathinfo($filename, PATHINFO_FILENAME),
+ 0,
+ 255 - ($ext ? strlen($ext) + 1 : 0),
+ mb_detect_encoding($filename)
+ ) . ($ext ? '.' . $ext : '');
+
+ return $filename;
+ }
+
+ public function beautifyFilename($filename)
+ {
+ // reduce consecutive characters
+ $filename = preg_replace([
+ // "file name.zip" becomes "file-name.zip"
+ '/ +/',
+ // "file___name.zip" becomes "file-name.zip"
+ '/_{2,}/',
+ // "file---name.zip" becomes "file-name.zip"
+ '/-+/',
+ ], '-', $filename);
+
+ $filename = preg_replace([
+ // "file--.--.-.--name.zip" becomes "file.name.zip"
+ '/-*\.-*/',
+ // "file...name..zip" becomes "file.name.zip"
+ '/\.{2,}/',
+ ], '.', $filename);
+
+ // lowercase for windows/unix interoperability
+ $filename = mb_strtolower($filename, mb_detect_encoding($filename));
+
+ // ".file-name.-" becomes "file-name"
+ $filename = trim($filename, '.-');
+
+ return trim($filename);
}
/**
@@ -342,15 +372,19 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/**
* @param Html2Pdf $oPdf
- * @param $sFilename
- * @param $target
- * @param $html
+ * @param $sFilename
+ * @param $target
+ * @param $html
+ *
* @return string|null
* @throws Html2PdfException
+ * @throws ContainerExceptionInterface
+ * @throws NotFoundExceptionInterface
*/
public function output(Html2Pdf $oPdf, $sFilename, $target, $html)
{
- if ((bool) Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') === true) {
+ $moduleSettings = ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class);
+ if ($moduleSettings->getBoolean( 'd3PdfDocumentsbDev', Constants::OXID_MODULE_ID )) {
return $this->outputDev($oPdf, $sFilename, $target, $html);
} else {
return $oPdf->output($sFilename, $target);
diff --git a/Application/views/admin_smarty/de/pdfdocuments_lang.php b/Application/views/admin_smarty/de/pdfdocuments_lang.php
index d77afd1..8556b65 100644
--- a/Application/views/admin_smarty/de/pdfdocuments_lang.php
+++ b/Application/views/admin_smarty/de/pdfdocuments_lang.php
@@ -8,16 +8,14 @@
* @link http://www.oxidmodule.com
*/
+use D3\PdfDocuments\Application\Model\Constants;
+
$sLangName = "Deutsch";
$aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternativer PDF-Logo Name
- Ohne Angabe ( leer ) wird automatisch folgender Datei-Name gewählt: pdf_logo.jpg
- Diese Datei muss sich im source/out/THEME/img/ Ordner befinden und muss aus technischen Gründen PNG/ JPG sein.
- Notfalls wird kein Bild eingefügt!',
+ 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',
diff --git a/Application/views/admin_smarty/en/pdfdocuments_lang.php b/Application/views/admin_smarty/en/pdfdocuments_lang.php
index 67947a8..bd868d4 100644
--- a/Application/views/admin_smarty/en/pdfdocuments_lang.php
+++ b/Application/views/admin_smarty/en/pdfdocuments_lang.php
@@ -8,16 +8,14 @@
* @link http://www.oxidmodule.com
*/
+use D3\PdfDocuments\Application\Model\Constants;
+
$sLangName = "English";
$aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternative PDF Logo Name
- Without specification (empty) the following file name will be automatically selected: pdf_logo.jpg
- This file must be located in the source/out/THEME/img/ folder and must be PNG or JPG for technical reasons.
- If necessary, no image will be inserted!',
+ 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
'D3_PDFDOCUMENTS' => 'PDF Documents',
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
diff --git a/Application/views/admin_twig/de/pdfdocuments_lang.php b/Application/views/admin_twig/de/pdfdocuments_lang.php
index 4849bc9..2ecffb8 100644
--- a/Application/views/admin_twig/de/pdfdocuments_lang.php
+++ b/Application/views/admin_twig/de/pdfdocuments_lang.php
@@ -15,11 +15,7 @@ $aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternativer PDF-Logo Name
- Ohne Angabe ( leer ) wird automatisch folgender Datei-Name gewählt: pdf_logo.jpg
- Diese Datei muss sich im source/out/THEME/img/ Ordner befinden und muss aus technischen Gründen PNG oder JPG sein.
- Notfalls wird kein Bild eingefügt!',
+ 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',
diff --git a/Application/views/admin_twig/en/pdfdocuments_lang.php b/Application/views/admin_twig/en/pdfdocuments_lang.php
index 5f5819c..bd868d4 100644
--- a/Application/views/admin_twig/en/pdfdocuments_lang.php
+++ b/Application/views/admin_twig/en/pdfdocuments_lang.php
@@ -8,16 +8,14 @@
* @link http://www.oxidmodule.com
*/
+use D3\PdfDocuments\Application\Model\Constants;
+
$sLangName = "English";
$aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
- 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternative PDF Logo Name
- Without specification (empty) the following file name will be automatically selected: pdf_logo.jpg
- This file must be located in the source/out/THEME/img/ folder and must be PNG/ JPG for technical reasons.
- If necessary, no image will be inserted!',
+ 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
'D3_PDFDOCUMENTS' => 'PDF Documents',
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
diff --git a/README.en.md b/README.en.md
index b4a88ab..56b7fa7 100644
--- a/README.en.md
+++ b/README.en.md
@@ -38,7 +38,8 @@ Detailed installation instructions can be found [online](https://docs.oxidmodule
## Credits:
-- PDF logo made by Dimitriy Morilubov from www.flaticon.com
+- PDF logo made by Dimitriy Morilubov by www.flaticon.com
+- example company logo by https://www.logologo.com/
## License
diff --git a/README.md b/README.md
index 329093a..ccc9cfb 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,7 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo
## Danksagung:
- PDF-Logo erstellt von Dimitriy Morilubov von www.flaticon.com
+- Beispielfirmenlogo von https://www.logologo.com/
## Lizenz
diff --git a/assets/out/img/clogo.jpg b/assets/out/img/clogo.jpg
new file mode 100644
index 0000000..08e6f37
Binary files /dev/null and b/assets/out/img/clogo.jpg differ
diff --git a/composer.json b/composer.json
index 0c9bfe0..ae97422 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,6 @@
"php": "^8.0",
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
"spipu/html2pdf": "~5.2.8",
- "d3/modcfg": "^7.1",
"beberlei/assert": "^3.3.2"
},
"autoload": {
diff --git a/development.md b/development.md
new file mode 100644
index 0000000..97310b7
--- /dev/null
+++ b/development.md
@@ -0,0 +1,29 @@
+# Entwicklungen
+
+Um das Modul anzupassen, gibt es verschiedene Möglichkeiten:
+
+## Grundsätzliches
+
+Wir empfehlen dringend, alle Veränderungen bestehender Dokumente und auch neue Dokumente in einem eigenen Modul abzulegen,
+um die Updatefähigkeit zu behalten.
+
+## neue Dokumente hinzufügen
+
+Neue Dokumente können analog zu den Bestehenden angelegt werden. Jedes Dokument besteht aus der entsprechenden
+PHP-Klasse (unter Application/Model/Documents) und deren Template (unter views/.../documents). Verwenden Sie die
+Bestandsdokumente als Implementierungsreferenz.
+
+Dokumentlisten sind für den Bestellbereich im Shopadmin sowie für die Generierung über den D3 Auftragsmanagers
+enthalten (unter Application/Model/Registries). Überladen Sie die Klassen und ergänzen Sie im Konstruktor Ihre neuen
+Dokumente.
+
+## bestehende Dokumente verändern
+
+Die Grundangaben eines Dokuments sind in dessen PHP-Datei definiert. Überladen Sie diese bei Bedarf und ändern die
+Einstellung.
+
+Die Inhalte der Dokumente sind in Templates definiert. In den Templates sind Blöcke eingerichtet, die mit den
+Überladungsmöglichkeiten des Shops ergänzt oder ersetzt werden können.
+
+Bei umfangreichen Anpassungen kann es sinnvoll sein, eigene Templates anzulegen, die in der PHP-Klasse des Dokuments als
+Quelle definiert wird.
\ No newline at end of file
diff --git a/metadata.php b/metadata.php
index c6c34b2..81eae74 100644
--- a/metadata.php
+++ b/metadata.php
@@ -17,19 +17,17 @@ use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
*/
$sMetadataVersion = '2.1';
-$logo = '';
-
/**
* Module information
*/
$aModule = [
'id' => Constants::OXID_MODULE_ID,
'title' => [
- 'de' => $logo.' PDF-Dokumente',
- 'en' => $logo.' PDF documents',
+ 'de' => '(D3) PDF-Dokumente',
+ 'en' => '(D3) PDF documents',
],
'version' => '2.0.0',
- 'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
+ 'author' => 'D3 Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
'extend' => [
@@ -42,41 +40,41 @@ $aModule = [
'@' . Constants::OXID_MODULE_ID . '/admin/d3orderoverview_pdfform.tpl' => 'views/smarty/admin/orderoverview_pdfform.tpl',
// Frontend - Flow - Deliverynote
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynote.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynote.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynoteNoLogo.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/informations.tpl' => 'views/smarty/flow/documents/deliverynote/inc/informations.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/recipientAddress.tpl' => 'views/smarty/flow/documents/deliverynote/inc/recipientAddress.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/salutation.tpl' => 'views/smarty/flow/documents/deliverynote/inc/salutation.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/conclusion.tpl' => 'views/smarty/flow/documents/deliverynote/inc/conclusion.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynote.tpl' => 'views/smarty/documents/deliverynote/deliverynote.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynoteNoLogo.tpl' => 'views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/informations.tpl' => 'views/smarty/documents/deliverynote/inc/informations.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/recipientAddress.tpl' => 'views/smarty/documents/deliverynote/inc/recipientAddress.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/salutation.tpl' => 'views/smarty/documents/deliverynote/inc/salutation.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/conclusion.tpl' => 'views/smarty/documents/deliverynote/inc/conclusion.tpl',
// Frontend - Flow - Invoice
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice.tpl' => 'views/smarty/flow/documents/invoice/invoice.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoiceNoLogo.tpl' => 'views/smarty/flow/documents/invoice/invoiceNoLogo.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/informations.tpl' => 'views/smarty/flow/documents/invoice/inc/informations.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/salutation.tpl' => 'views/smarty/flow/documents/invoice/inc/salutation.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/conclusion.tpl' => 'views/smarty/flow/documents/invoice/inc/conclusion.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/payinfo.tpl' => 'views/smarty/flow/documents/invoice/inc/payinfo.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice.tpl' => 'views/smarty/documents/invoice/invoice.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoiceNoLogo.tpl' => 'views/smarty/documents/invoice/invoiceNoLogo.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/informations.tpl' => 'views/smarty/documents/invoice/inc/informations.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/salutation.tpl' => 'views/smarty/documents/invoice/inc/salutation.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/conclusion.tpl' => 'views/smarty/documents/invoice/inc/conclusion.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/payinfo.tpl' => 'views/smarty/documents/invoice/inc/payinfo.tpl',
// Frontend - Flow - Inc - Page
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/base.tpl' => 'views/smarty/flow/documents/inc/page/base.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/header.tpl' => 'views/smarty/flow/documents/inc/page/header.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/footer.tpl' => 'views/smarty/flow/documents/inc/page/footer.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/returnaddress.tpl' => 'views/smarty/flow/documents/inc/page/returnaddress.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/base.tpl' => 'views/smarty/documents/inc/page/base.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/header.tpl' => 'views/smarty/documents/inc/page/header.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/footer.tpl' => 'views/smarty/documents/inc/page/footer.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/returnaddress.tpl' => 'views/smarty/documents/inc/page/returnaddress.tpl',
// Frontend - Flow - Inc - Elements
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/addressarea.tpl' => 'views/smarty/flow/documents/inc/elements/addressarea.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/recipientAddress.tpl' => 'views/smarty/flow/documents/inc/elements/recipientAddress.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/informations.tpl' => 'views/smarty/flow/documents/inc/elements/informations.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/deliveryaddress.tpl' => 'views/smarty/flow/documents/inc/elements/deliveryaddress.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlelist.tpl' => 'views/smarty/flow/documents/inc/elements/articlelist.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlecostssummary.tpl' => 'views/smarty/flow/documents/inc/elements/articlecostssummary.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/foldmarks.tpl' => 'views/smarty/flow/documents/inc/elements/foldmarks.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/addressarea.tpl' => 'views/smarty/documents/inc/elements/addressarea.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/recipientAddress.tpl' => 'views/smarty/documents/inc/elements/recipientAddress.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/informations.tpl' => 'views/smarty/documents/inc/elements/informations.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/deliveryaddress.tpl' => 'views/smarty/documents/inc/elements/deliveryaddress.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlelist.tpl' => 'views/smarty/documents/inc/elements/articlelist.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlecostssummary.tpl' => 'views/smarty/documents/inc/elements/articlecostssummary.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/foldmarks.tpl' => 'views/smarty/documents/inc/elements/foldmarks.tpl',
// Frontend - Flow - Inc - Helper
- '@' . Constants::OXID_MODULE_ID . '/documents/inc/helper/rulers.tpl' => 'views/smarty/flow/documents/inc/helper/rulers.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/inc/helper/rulers.tpl' => 'views/smarty/documents/inc/helper/rulers.tpl',
// Frontend - Flow - Inc - Styles
- '@' . Constants::OXID_MODULE_ID . '/assets/d3pdfstyles.css' => 'assets/out/src/css/pdfStyling.css',
+ '@' . Constants::OXID_MODULE_ID . '/assets/d3pdfstyles.css.tpl' => 'views/smarty/assets/pdfStyling.css.tpl',
],
'events' => [],
'blocks' => [
@@ -92,12 +90,6 @@ $aModule = [
'name' => Constants::OXID_MODULE_ID.'bDev',
'type' => 'bool',
'value' => false
- ],
- [
- 'group' => Constants::OXID_MODULE_ID.'main',
- 'name' => Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName',
- 'type' => 'str',
- 'value' => ''
]
]
];
diff --git a/assets/out/src/css/pdfStyling.css b/views/smarty/assets/pdfStyling.css.tpl
similarity index 100%
rename from assets/out/src/css/pdfStyling.css
rename to views/smarty/assets/pdfStyling.css.tpl
diff --git a/views/smarty/documents/deliverynote/deliverynote.tpl b/views/smarty/documents/deliverynote/deliverynote.tpl
index 76a1b21..de5a96f 100644
--- a/views/smarty/documents/deliverynote/deliverynote.tpl
+++ b/views/smarty/documents/deliverynote/deliverynote.tpl
@@ -3,33 +3,33 @@
[{capture append="pdfBlock_style"}]
[{block name="pdfStyles"}]
- [{include file="@d3PdfDocuments/assets/d3pdfstyles.css"}]
+ [{include file="@d3PdfDocuments/assets/d3pdfstyles.css.tpl"}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_header"}]
[{block name="pdfHeader"}]
- [{include file="@d3PdfDocuments/documents/inc/page/header" showLogo=$showLogo}]
+ [{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_content"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/foldmarks" pagePadding=$pagePadding}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
[{block name="pdfAddressArea"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/addressarea" addressfile="@d3PdfDocuments/documents/deliverynote/recipientAddress"}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/addressarea.tpl" addressfile="@d3PdfDocuments/documents/deliverynote/recipientAddress.tpl"}]
[{/block}]
[{block name="pdfInformations"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/informations" documentinformationfile="@d3PdfDocuments/documents/deliverynote/informations"}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/informations.tpl" documentinformationfile="@d3PdfDocuments/documents/deliverynote/informations.tpl"}]
[{/block}]
[{block name="pdfSalutation"}]
- [{include file="@d3PdfDocuments/documents/deliverynote/salutation"}]
+ [{include file="@d3PdfDocuments/documents/deliverynote/salutation.tpl"}]
[{/block}]
[{block name="pdfArticleList"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/articlelist" showPrices=false}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/articlelist.tpl" showPrices=false}]
[{/block}]
[{block name="pdfConclusion"}]
@@ -39,8 +39,8 @@
[{capture append="pdfBlock_footer"}]
[{block name="pdfFooter"}]
- [{include file="@d3PdfDocuments/documents/inc/page/footer" pagePadding=$pagePadding}]
+ [{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
[{/block}]
[{/capture}]
-[{include file="@d3PdfDocuments/documents/inc/page/base" pagePadding=$pagePadding}]
\ No newline at end of file
+[{include file="@d3PdfDocuments/documents/inc/page/base.tpl" pagePadding=$pagePadding}]
\ No newline at end of file
diff --git a/views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl b/views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl
index 5daca64..c68baeb 100644
--- a/views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl
+++ b/views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl
@@ -1 +1 @@
-[{include file="@d3PdfDocuments/documents/deliverynote/deliverynote" showLogo=false}]
\ No newline at end of file
+[{include file="@d3PdfDocuments/documents/deliverynote/deliverynote.tpl" showLogo=false}]
\ No newline at end of file
diff --git a/views/smarty/documents/inc/elements/addressarea.tpl b/views/smarty/documents/inc/elements/addressarea.tpl
index 7d69c83..167099c 100644
--- a/views/smarty/documents/inc/elements/addressarea.tpl
+++ b/views/smarty/documents/inc/elements/addressarea.tpl
@@ -1,5 +1,5 @@
-[{assign var="backaddressfile" value=$backaddressfile|default:"@d3PdfDocuments/documents/inc/page/returnaddress"}]
-[{assign var="addressfile" value=$addressfile|default:"@d3PdfDocuments/documents/inc/elements/recipientAddress"}]
+[{assign var="backaddressfile" value=$backaddressfile|default:"@d3PdfDocuments/documents/inc/page/returnaddress.tpl"}]
+[{assign var="addressfile" value=$addressfile|default:"@d3PdfDocuments/documents/inc/elements/recipientAddress.tpl"}]