diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
index 8dbd363..912c55e 100644
--- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
+++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php
@@ -17,6 +17,8 @@ use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as
use OxidEsales\Eshop\Core\Base;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
+use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
+use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateEngineInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRenderer;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
use Smarty;
@@ -50,15 +52,25 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
{
parent::__construct();
- /** @var TemplateRenderer $oTemplateRenderer */
- $oTemplateRenderer = $this->getContainer()
- ->get(TemplateRendererBridgeInterface::class)
- ->getTemplateRenderer();
-
- //ToDo: hier nochmal prüfen, wie das mit smarty aussieht!
- $this->oTemplateEngine = $oTemplateRenderer->getTemplateEngine();
+ $this->oTemplateEngine = $this->d3GetTemplateEngine();
}
+ public function d3GetTemplateEngine() :TemplateEngineInterface
+ {
+ $renderer = $this->d3GetTemplateRendererBridge()->getTemplateRenderer();
+ return $renderer->getTemplateEngine();
+ }
+
+ /**
+ * @throws ContainerExceptionInterface
+ * @throws NotFoundExceptionInterface
+ */
+ public function d3GetTemplateRendererBridge(): TemplateRendererBridgeInterface
+ {
+ return ContainerFactory::getInstance()->getContainer()
+ ->get(TemplateRendererBridgeInterface::class);
+ }
+
public function runPreAction()
{
}
diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php
index 1f2b09b..28c23cc 100644
--- a/Application/Model/Documents/deliverynotePdf.php
+++ b/Application/Model/Documents/deliverynotePdf.php
@@ -43,6 +43,6 @@ class deliverynotePdf extends pdfdocumentsOrder
*/
public function getTemplate()
{
- return '@d3PdfDocuments/documents/deliverynote/d3deliverynote_pdf.tpl';
+ return '@d3PdfDocuments/admin/documents/deliverynote/deliverynote';
}
}
\ No newline at end of file
diff --git a/Application/Model/Documents/deliverynotewithoutlogoPdf.php b/Application/Model/Documents/deliverynotewithoutlogoPdf.php
index ebf08e5..45a3bf7 100644
--- a/Application/Model/Documents/deliverynotewithoutlogoPdf.php
+++ b/Application/Model/Documents/deliverynotewithoutlogoPdf.php
@@ -41,6 +41,6 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf
*/
public function getTemplate()
{
- return '@d3PdfDocuments/documents/deliverynote/d3deliverynoteNoLogo_pdf.tpl';
+ return '@d3PdfDocuments/admin/documents/deliverynote/deliverynoteNoLogo';
}
}
\ No newline at end of file
diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php
index 6a5fe08..d636976 100644
--- a/Application/Model/Documents/invoicePdf.php
+++ b/Application/Model/Documents/invoicePdf.php
@@ -95,7 +95,7 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
}
public function getTemplate(){
- return '@d3PdfDocuments/documents/invoice/d3invoice_pdf.tpl';
+ return '@d3PdfDocuments/admin/documents/invoice/invoice';
}
/**
diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php
index 2c90119..0b912b4 100644
--- a/Application/Model/Documents/invoicewithoutlogoPdf.php
+++ b/Application/Model/Documents/invoicewithoutlogoPdf.php
@@ -40,6 +40,6 @@ class invoicewithoutlogoPdf extends invoicePdf
* @return string
*/
public function getTemplate(){
- return '@d3PdfDocuments/documents/invoice/d3invoiceNoLogo_pdf.tpl';
+ return '@d3PdfDocuments/admin/documents/invoice/invoiceNoLogo';
}
}
\ No newline at end of file
diff --git a/metadata.php b/metadata.php
index 1929063..126c2a0 100644
--- a/metadata.php
+++ b/metadata.php
@@ -42,20 +42,20 @@ $aModule = [
'@' . Constants::OXID_MODULE_ID . '/admin/d3orderoverview_pdfform.tpl' => 'views/smarty/admin/orderoverview_pdfform.tpl',
// Frontend - Flow - Deliverynote
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3deliverynote_pdf.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynote.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3deliverynoteNoLogo_pdf.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_informations.tpl' => 'views/smarty/flow/documents/deliverynote/inc/informations.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_recipient.tpl' => 'views/smarty/flow/documents/deliverynote/inc/recipientAddress.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_salutation.tpl' => 'views/smarty/flow/documents/deliverynote/inc/salutation.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_conclusion.tpl' => 'views/smarty/flow/documents/deliverynote/inc/conclusion.tpl',
+ '@' . 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/delnote_informations.tpl' => 'views/smarty/flow/documents/deliverynote/inc/informations.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/delnote_recipient.tpl' => 'views/smarty/flow/documents/deliverynote/inc/recipientAddress.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/delnote_salutation.tpl' => 'views/smarty/flow/documents/deliverynote/inc/salutation.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/delnote_conclusion.tpl' => 'views/smarty/flow/documents/deliverynote/inc/conclusion.tpl',
// Frontend - Flow - Invoice
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf.tpl' => 'views/smarty/flow/documents/invoice/invoice.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoiceNoLogo_pdf.tpl' => 'views/smarty/flow/documents/invoice/invoiceNoLogo.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_informations.tpl' => 'views/smarty/flow/documents/invoice/inc/informations.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_salutation.tpl' => 'views/smarty/flow/documents/invoice/inc/salutation.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_conclusion.tpl' => 'views/smarty/flow/documents/invoice/inc/conclusion.tpl',
- '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_payinfo.tpl' => 'views/smarty/flow/documents/invoice/inc/payinfo.tpl',
+ '@' . 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/invoice_informations.tpl' => 'views/smarty/flow/documents/invoice/inc/informations.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice_salutation.tpl' => 'views/smarty/flow/documents/invoice/inc/salutation.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice_conclusion.tpl' => 'views/smarty/flow/documents/invoice/inc/conclusion.tpl',
+ '@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice_payinfo.tpl' => 'views/smarty/flow/documents/invoice/inc/payinfo.tpl',
// Frontend - Flow - Inc - Page
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/d3pdfbase.tpl' => 'views/smarty/flow/documents/inc/page/base.tpl',
diff --git a/views/smarty/flow/documents/deliverynote/deliverynote.tpl b/views/smarty/flow/documents/deliverynote/deliverynote.tpl
index e1a4ec6..ecd1d53 100644
--- a/views/smarty/flow/documents/deliverynote/deliverynote.tpl
+++ b/views/smarty/flow/documents/deliverynote/deliverynote.tpl
@@ -17,15 +17,15 @@
[{include file="@d3PdfDocuments/documents/inc/elements/d3pdffoldmarks.tpl" pagePadding=$pagePadding}]
[{block name="pdfAddressArea"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.tpl" addressfile="@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_recipient.tpl"}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.tpl" addressfile="@d3PdfDocuments/documents/deliverynote/delnote_recipient"}]
[{/block}]
[{block name="pdfInformations"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfinformations.tpl" documentinformationfile="@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_informations.tpl"}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfinformations.tpl" documentinformationfile="@d3PdfDocuments/documents/deliverynote/delnote_informations"}]
[{/block}]
[{block name="pdfSalutation"}]
- [{include file="@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_salutation.tpl"}]
+ [{include file="@d3PdfDocuments/documents/deliverynote/delnote_salutation"}]
[{/block}]
[{block name="pdfArticleList"}]
@@ -33,7 +33,7 @@
[{/block}]
[{block name="pdfConclusion"}]
- [{include file="@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_conclusion.tpl"}]
+ [{include file="@d3PdfDocuments/documents/deliverynote/delnote_conclusion.tpl"}]
[{/block}]
[{/capture}]
diff --git a/views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl b/views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl
index 28fb43b..5daca64 100644
--- a/views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl
+++ b/views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl
@@ -1 +1 @@
-[{include file="@d3PdfDocuments/documents/deliverynote/d3deliverynote_pdf.tpl" showLogo=false}]
\ No newline at end of file
+[{include file="@d3PdfDocuments/documents/deliverynote/deliverynote" showLogo=false}]
\ No newline at end of file
diff --git a/views/smarty/flow/documents/invoice/inc/conclusion.tpl b/views/smarty/flow/documents/invoice/inc/conclusion.tpl
index ab31ca2..a1ac51b 100644
--- a/views/smarty/flow/documents/invoice/inc/conclusion.tpl
+++ b/views/smarty/flow/documents/invoice/inc/conclusion.tpl
@@ -5,7 +5,7 @@
[{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}]
[{$payment->getFieldData('oxdesc')}]
- [{include file="@d3PdfDocuments/documents/invoice/d3invoice_pdf_payinfo.tpl"}]
+ [{include file="@d3PdfDocuments/documents/invoice/invoice_payinfo"}]
[{/block}]
diff --git a/views/smarty/flow/documents/invoice/invoice.tpl b/views/smarty/flow/documents/invoice/invoice.tpl
index b817c8c..08c935a 100644
--- a/views/smarty/flow/documents/invoice/invoice.tpl
+++ b/views/smarty/flow/documents/invoice/invoice.tpl
@@ -22,7 +22,7 @@
[{/block}]
[{block name="pdfInformations"}]
- [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfinformations.tpl" documentinformationfile="@d3PdfDocuments/documents/invoice/d3invoice_pdf_informations.tpl"}]
+ [{include file="@d3PdfDocuments/documents/inc/elements/d3pdfinformations.tpl" documentinformationfile="@d3PdfDocuments/documents/invoice/invoice_informations"}]
[{/block}]
[{block name="pdfDeliveryAddress"}]
@@ -30,7 +30,7 @@
[{/block}]
[{block name="pdfSalutation"}]
- [{include file="@d3PdfDocuments/documents/invoice/d3invoice_pdf_salutation.tpl"}]
+ [{include file="@d3PdfDocuments/documents/invoice/invoice_salutation"}]
[{/block}]
[{block name="pdfArticleList"}]
@@ -38,7 +38,7 @@
[{/block}]
[{block name="pdfConclusion"}]
- [{include file="@d3PdfDocuments/documents/invoice/d3invoice_pdf_conclusion.tpl"}]
+ [{include file="@d3PdfDocuments/documents/invoice/invoice_conclusion"}]
[{/block}]
[{/capture}]
diff --git a/views/smarty/flow/documents/invoice/invoiceNoLogo.tpl b/views/smarty/flow/documents/invoice/invoiceNoLogo.tpl
index d1d8184..f093401 100644
--- a/views/smarty/flow/documents/invoice/invoiceNoLogo.tpl
+++ b/views/smarty/flow/documents/invoice/invoiceNoLogo.tpl
@@ -1 +1 @@
-[{include file="@d3PdfDocuments/documents/invoice/d3invoice_pdf.tpl" showLogo=false}]
\ No newline at end of file
+[{include file="@d3PdfDocuments/documents/invoice/invoice" showLogo=false}]
\ No newline at end of file
diff --git a/views/twig/admin/documents/deliverynote/deliverynote.html.twig b/views/twig/admin/documents/deliverynote/deliverynote.html.twig
index 7b42376..ea081b0 100644
--- a/views/twig/admin/documents/deliverynote/deliverynote.html.twig
+++ b/views/twig/admin/documents/deliverynote/deliverynote.html.twig
@@ -17,15 +17,15 @@
{% include "@d3PdfDocuments/documents/inc/elements/d3pdffoldmarks.html.twig" with {pagePadding: pagePadding} %}
{% block pdfAddressArea %}
- {% include "@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.html.twig" with {addressfile: "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_recipient.tpl"} %}
+ {% include "@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.html.twig" with {addressfile: "@d3PdfDocuments/documents/deliverynote/delnote_recipient"} %}
{% endblock %}
{% block pdfInformations %}
- {% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_informations.tpl"} %}
+ {% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/deliverynote/delnote_informations"} %}
{% endblock %}
{% block pdfSalutation %}
- {% include "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_salutation.html.twig" %}
+ {% include "@d3PdfDocuments/documents/deliverynote/delnote_salutation" %}
{% endblock %}
{% block pdfArticleList %}
@@ -33,7 +33,7 @@
{% endblock %}
{% block pdfConclusion %}
- {% include "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_conclusion.html.twig" %}
+ {% include "@d3PdfDocuments/documents/deliverynote/delnote_conclusion" %}
{% endblock %}
{% endcapture %}
diff --git a/views/twig/admin/documents/deliverynote/deliverynoteNoLogo.html.twig b/views/twig/admin/documents/deliverynote/deliverynoteNoLogo.html.twig
index ac6a308..e61f005 100644
--- a/views/twig/admin/documents/deliverynote/deliverynoteNoLogo.html.twig
+++ b/views/twig/admin/documents/deliverynote/deliverynoteNoLogo.html.twig
@@ -1 +1 @@
-{% include "@d3PdfDocuments/documents/deliverynote/d3deliverynote_pdf.html.twig" with {showLogo: false} %}
\ No newline at end of file
+{% include "@d3PdfDocuments/documents/deliverynote/deliverynote" with {showLogo: false} %}
\ No newline at end of file
diff --git a/views/twig/admin/documents/invoice/inc/conclusion.html.twig b/views/twig/admin/documents/invoice/inc/conclusion.html.twig
index 0662e67..eecec5f 100644
--- a/views/twig/admin/documents/invoice/inc/conclusion.html.twig
+++ b/views/twig/admin/documents/invoice/inc/conclusion.html.twig
@@ -5,7 +5,7 @@
{{ translate({ ident: "D3_PDFDOCUMENTS_USED_PAYMENTMETHOD", suffix: "COLON" }) }}
{{ payment.getFieldData('oxdesc') }}
- {% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_payinfo.html.twig" %}
+ {% include "@d3PdfDocuments/documents/invoice/invoice_payinfo" %}
{% endblock %}
diff --git a/views/twig/admin/documents/invoice/invoice.html.twig b/views/twig/admin/documents/invoice/invoice.html.twig
index fe1fe8b..b5bedfd 100644
--- a/views/twig/admin/documents/invoice/invoice.html.twig
+++ b/views/twig/admin/documents/invoice/invoice.html.twig
@@ -22,7 +22,7 @@
{% endblock %}
{% block pdfInformations %}
- {% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/invoice/d3invoice_pdf_informations.tpl"} %}
+ {% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/invoice/invoice_informations"} %}
{% endblock %}
{% block pdfDeliveryAddress %}
@@ -30,7 +30,7 @@
{% endblock %}
{% block pdfSalutation %}
- {% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_salutation.html.twig" %}
+ {% include "@d3PdfDocuments/documents/invoice/invoice_salutation" %}
{% endblock %}
{% block pdfArticleList %}
@@ -38,7 +38,7 @@
{% endblock %}
{% block pdfConclusion %}
- {% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_conclusion.html.twig" %}
+ {% include "@d3PdfDocuments/documents/invoice/invoice_conclusion" %}
{% endblock %}
{% endcapture %}
diff --git a/views/twig/admin/documents/invoice/invoiceNoLogo.html.twig b/views/twig/admin/documents/invoice/invoiceNoLogo.html.twig
index a19b7f8..f33bd18 100644
--- a/views/twig/admin/documents/invoice/invoiceNoLogo.html.twig
+++ b/views/twig/admin/documents/invoice/invoiceNoLogo.html.twig
@@ -1 +1 @@
-{% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf.html.twig" with {showLogo: false} %}
\ No newline at end of file
+{% include "@d3PdfDocuments/documents/invoice/invoice" with {showLogo: false} %}
\ No newline at end of file