9 Commits

17 changed files with 152 additions and 39 deletions

View File

@ -27,6 +27,10 @@ class orderOverviewPdfGenerator
{ {
$Pdf= $this->getPdfClass(); $Pdf= $this->getPdfClass();
$Pdf->setDevelopmentMode(
Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') &&
Registry::getRequest()->getRequestEscapedParameter('devmode')
);
$Pdf->setOrder($order); $Pdf->setOrder($order);
$Pdf->downloadPdf($iSelLang); $Pdf->downloadPdf($iSelLang);
} }

View File

@ -42,6 +42,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/** @var string */ /** @var string */
public $filename; public $filename;
protected $devMode = false;
/** /**
* pdfDocumentsGeneric constructor. * pdfDocumentsGeneric constructor.
*/ */
@ -53,6 +55,11 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
$this->oSmarty = Registry::getUtilsView()->getSmarty(true); $this->oSmarty = Registry::getUtilsView()->getSmarty(true);
} }
public function setDevelopmentMode(bool $devMode)
{
$this->devMode = $devMode;
}
public function runPreAction() public function runPreAction()
{ {
} }
@ -316,7 +323,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
*/ */
public function output(Html2Pdf $oPdf, $sFilename, $target, $html) public function output(Html2Pdf $oPdf, $sFilename, $target, $html)
{ {
if ((bool) Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') === true) { if ($this->devMode) {
return $this->outputDev($oPdf, $sFilename, $target, $html); return $this->outputDev($oPdf, $sFilename, $target, $html);
} else { } else {
return $oPdf->output($sFilename, $target); return $oPdf->output($sFilename, $target);
@ -332,7 +339,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
*/ */
public function outputDev(Html2Pdf $oPdf, $sFilename, $target, $html) public function outputDev(Html2Pdf $oPdf, $sFilename, $target, $html)
{ {
$sFilename = str_replace('.pdf', '.html', $sFilename); $sFilename = str_replace('.pdf', '.sgml', $sFilename);
switch($target) { switch($target) {
case 'I': { case 'I': {
@ -357,7 +364,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
break; break;
} }
case 'D': { case 'D': {
// Download PDF as file // Download PDF as a file
if (ob_get_contents()) { if (ob_get_contents()) {
$oPdf->pdf->Error('Some data has already been output, can\'t send PDF file'); $oPdf->pdf->Error('Some data has already been output, can\'t send PDF file');
} }
@ -373,7 +380,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
header('Content-Type: application/force-download'); header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false); header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false); header('Content-Type: application/download', false);
header('Content-Type: text/html', false); header('Content-Type: text/sgml', false);
// use the Content-Disposition header to supply a recommended filename // use the Content-Disposition header to supply a recommended filename
header('Content-Disposition: attachment; filename="'.basename($sFilename).'";'); header('Content-Disposition: attachment; filename="'.basename($sFilename).'";');
header('Content-Transfer-Encoding: binary'); header('Content-Transfer-Encoding: binary');

View File

@ -12,6 +12,8 @@ namespace D3\PdfDocuments\Application\Model\Interfaces;
interface pdfdocumentsGenericInterface interface pdfdocumentsGenericInterface
{ {
public function setDevelopmentMode(bool $devMode);
/** /**
* @return string * @return string
*/ */

View File

@ -15,14 +15,20 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
use OxidEsales\Eshop\Core\Registry;
class registryOrdermanagerActions extends registryAbstract implements registryOrdermanagerActionsInterface class registryOrdermanagerActions extends registryAbstract implements registryOrdermanagerActionsInterface
{ {
public function __construct() public function __construct()
{ {
$config = Registry::getConfig();
if ($config->getConfigParam('d3PdfDocumentsDocInvoice'))
$this->addGenerator(invoicePdf::class); $this->addGenerator(invoicePdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocDeliveryNote'))
$this->addGenerator(deliverynotePdf::class); $this->addGenerator(deliverynotePdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocInvoiceNoLogo'))
$this->addGenerator(invoicewithoutlogoPdf::class); $this->addGenerator(invoicewithoutlogoPdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocDeliveryNoteNoLogo'))
$this->addGenerator(deliverynotewithoutlogoPdf::class); $this->addGenerator(deliverynotewithoutlogoPdf::class);
} }

View File

@ -15,14 +15,20 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf;
use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Documents\invoicePdf;
use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface;
use OxidEsales\Eshop\Core\Registry;
class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface
{ {
public function __construct() public function __construct()
{ {
$config = Registry::getConfig();
if ($config->getConfigParam('d3PdfDocumentsDocInvoice'))
$this->addGenerator(invoicePdf::class); $this->addGenerator(invoicePdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocDeliveryNote'))
$this->addGenerator(deliverynotePdf::class); $this->addGenerator(deliverynotePdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocInvoiceNoLogo'))
$this->addGenerator(invoicewithoutlogoPdf::class); $this->addGenerator(invoicewithoutlogoPdf::class);
if ($config->getConfigParam('d3PdfDocumentsDocDeliveryNoteNoLogo'))
$this->addGenerator(deliverynotewithoutlogoPdf::class); $this->addGenerator(deliverynotewithoutlogoPdf::class);
} }

View File

@ -13,7 +13,7 @@ $aLang = array(
'charset' => 'utf-8', 'charset' => 'utf-8',
'D3_PDFDOCUMENTS_THANKYOU_1' => 'Vielen Dank für Ihren Einkauf!', 'D3_PDFDOCUMENTS_THANKYOU_1' => 'Vielen Dank für Ihren Einkauf!',
'D3_PDFDOCUMENTS_THANKYOU_2' => 'Ihr Team von %1$s', 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Ihr Team von %1$s.',
'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'So erreichen Sie uns:', 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'So erreichen Sie uns:',
'D3_PDFDOCUMENTS_TELEFON' => 'Telefon', 'D3_PDFDOCUMENTS_TELEFON' => 'Telefon',
@ -65,7 +65,7 @@ $aLang = array(
'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)',
'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise',
'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Zahlbar bis zum', 'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Zahlbar bis zum %s.',
'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.',
'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer', 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer',

View File

@ -12,7 +12,7 @@ $aLang = array(
'charset' => 'utf-8', 'charset' => 'utf-8',
'D3_PDFDOCUMENTS_THANKYOU_1' => 'Many thanks for your purchase!', 'D3_PDFDOCUMENTS_THANKYOU_1' => 'Many thanks for your purchase!',
'D3_PDFDOCUMENTS_THANKYOU_2' => 'Your team from %1$s', 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Your team from %1$s.',
'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows', 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows',
'D3_PDFDOCUMENTS_TELEFON' => 'Telephone', 'D3_PDFDOCUMENTS_TELEFON' => 'Telephone',
@ -33,8 +33,8 @@ $aLang = array(
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo', 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo',
'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Delivery note',
'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Deliverynote without logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Delivery note without logo',
'D3_PDFDOCUMENTS_ORDERNR' => 'Order No.', 'D3_PDFDOCUMENTS_ORDERNR' => 'Order No.',
'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"',
@ -64,7 +64,7 @@ $aLang = array(
'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)',
'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method',
'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Billing till', 'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Billing till %s.',
'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.',
'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Managing director', 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Managing director',

View File

@ -19,13 +19,23 @@ $aLang = array(
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen', 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus',
'HELP_SHOP_MODULE_d3PdfDocumentsbDev' => 'Mit aktiviertem Entwicklermodus wird das Dokument im '. 'HELP_SHOP_MODULE_d3PdfDocumentsbDev' => 'Mit aktiviertem Entwicklermodus kann das Dokument im '.
'HTML-Format ausgegeben. Inhaltliche Fehler können so besser nachvollzogen werden.', 'SGML-Format ausgegeben werden. Inhaltliche Fehler können so besser nachvollzogen werden.',
'SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => 'BasicAuth des Shops - Benutzername (optional)', 'SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => 'BasicAuth des Shops - Benutzername (optional)',
'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => $basicAuthHelp, 'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => $basicAuthHelp,
'SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => 'BasicAuth des Shops - Passwort (optional)', 'SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => 'BasicAuth des Shops - Passwort (optional)',
'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => $basicAuthHelp, 'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => $basicAuthHelp,
'SHOP_MODULE_GROUP_d3PdfDocumentscontents' => 'Inhalte',
'SHOP_MODULE_d3PdfDocumentsLogoUrl' => 'Logo-Grafik URL',
'SHOP_MODULE_d3PdfDocumentsBackgroundUrl' => 'Hintergrund-Grafik URL',
'SHOP_MODULE_GROUP_d3PdfDocumentsdocuments' => 'Dokumente',
'SHOP_MODULE_d3PdfDocumentsDocInvoice' => 'Rechnung',
'SHOP_MODULE_d3PdfDocumentsDocInvoiceNoLogo' => 'Rechnung ohne Logo',
'SHOP_MODULE_d3PdfDocumentsDocDeliveryNote' => 'Lieferschein',
'SHOP_MODULE_d3PdfDocumentsDocDeliveryNoteNoLogo' => 'Lieferschein ohne Logo',
'D3_PDFDOCUMENTS' => 'PDF-Dokumente', 'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',
'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Rechnung ohne Logo', 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Rechnung ohne Logo',
@ -34,5 +44,6 @@ $aLang = array(
'D3_PDFDOCUMENTS_PDF_TYPE' => 'Dokument', 'D3_PDFDOCUMENTS_PDF_TYPE' => 'Dokument',
'D3_PDFDOCUMENTS_LANGUAGE' => 'Sprache', 'D3_PDFDOCUMENTS_LANGUAGE' => 'Sprache',
'D3_PDFDOCUMENTS_SGML_GENERATE' => 'SGML erstellen',
'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Dokument erstellen', 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Dokument erstellen',
); );

View File

@ -19,20 +19,31 @@ $aLang = array(
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings', 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode',
'HELP_SHOP_MODULE_d3PdfDocumentsbDev' => 'If developer mode is activated, the document is output in '. 'HELP_SHOP_MODULE_d3PdfDocumentsbDev' => 'If developer mode is activated, the document can exported '.
'HTML format. This makes it much easier to trace content errors.', 'in SGML format. This makes it much easier to trace content errors.',
'SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => 'BasicAuth of the shop - user name (optional)', 'SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => 'BasicAuth of the shop - user name (optional)',
'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => $basicAuthHelp, 'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthUserName' => $basicAuthHelp,
'SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => 'BasicAuth of the shop - password (optional)', 'SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => 'BasicAuth of the shop - password (optional)',
'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => $basicAuthHelp, 'HELP_SHOP_MODULE_d3PdfDocumentsbasicAuthPassword' => $basicAuthHelp,
'SHOP_MODULE_GROUP_d3PdfDocumentscontents' => 'Contents',
'SHOP_MODULE_d3PdfDocumentsLogoUrl' => 'Logo image URL',
'SHOP_MODULE_d3PdfDocumentsBackgroundUrl' => 'Background image URL',
'SHOP_MODULE_GROUP_d3PdfDocumentsdocuments' => 'Documents',
'SHOP_MODULE_d3PdfDocumentsDocInvoice' => 'Invoice',
'SHOP_MODULE_d3PdfDocumentsDocInvoiceNoLogo' => 'Invoice without logo',
'SHOP_MODULE_d3PdfDocumentsDocDeliveryNote' => 'Delivery note',
'SHOP_MODULE_d3PdfDocumentsDocDeliveryNoteNoLogo' => 'Delivery note without logo',
'D3_PDFDOCUMENTS' => 'PDF Documents', 'D3_PDFDOCUMENTS' => 'PDF Documents',
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo', 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo',
'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Delivery note',
'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Deliverynote without logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Delivery note without logo',
'D3_PDFDOCUMENTS_PDF_TYPE' => 'Document', 'D3_PDFDOCUMENTS_PDF_TYPE' => 'Document',
'D3_PDFDOCUMENTS_LANGUAGE' => 'Language', 'D3_PDFDOCUMENTS_LANGUAGE' => 'Language',
'D3_PDFDOCUMENTS_SGML_GENERATE' => 'Create SGML',
'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create Document', 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create Document',
); );

View File

@ -1,10 +1,14 @@
[{if $edit && $oView->d3CanExport()}] [{if $edit && $oView->d3CanExport()}]
<br> <br>
[{assign var="config" value=$oViewConf->getConfig()}]
[{assign var="devmode" value=$config->getConfigParam('d3PdfDocumentsbDev')}]
<form name="d3CreatePdf" id="d3CreatePdf" action="[{$oViewConf->getSelfLink()}]" method="post" target="d3ExpPDF"> <form name="d3CreatePdf" id="d3CreatePdf" action="[{$oViewConf->getSelfLink()}]" method="post" target="d3ExpPDF">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="order_overview"> <input type="hidden" name="cl" value="order_overview">
<input type="hidden" name="fnc" value="d3CreatePDF"> <input type="hidden" name="fnc" value="d3CreatePDF">
<input type="hidden" name="oxid" value="[{$oxid}]"> <input type="hidden" name="oxid" value="[{$oxid}]">
[{if $devmode}]<input type="hidden" id="devmode" name="devmode" value="0">[{/if}]
<fieldset style="padding: 5px"> <fieldset style="padding: 5px">
<legend>[{oxmultilang ident="D3_PDFDOCUMENTS"}]</legend> <legend>[{oxmultilang ident="D3_PDFDOCUMENTS"}]</legend>
<table style="width: 100%"> <table style="width: 100%">
@ -14,7 +18,7 @@
</td> </td>
<td style="vertical-align: top; text-align: right" class="edittext"> <td style="vertical-align: top; text-align: right" class="edittext">
<label for="pdftype">[{oxmultilang ident="D3_PDFDOCUMENTS_PDF_TYPE" suffix="COLON"}]</label>:&nbsp; <label for="pdftype">[{oxmultilang ident="D3_PDFDOCUMENTS_PDF_TYPE" suffix="COLON"}]</label>:&nbsp;
<select id="pdftype" name="pdftype" class="editinput" style="width:80px;"> <select id="pdftype" name="pdftype" class="editinput" style="min-width:80px;">
[{block name="d3_pdfdocuments_order_overview_pdfTypeOptions"}] [{block name="d3_pdfdocuments_order_overview_pdfTypeOptions"}]
[{assign var="generatorList" value=$oView->d3getGeneratorList()}] [{assign var="generatorList" value=$oView->d3getGeneratorList()}]
[{foreach from=$generatorList->getList() item="generator"}] [{foreach from=$generatorList->getList() item="generator"}]
@ -27,7 +31,7 @@
<tr> <tr>
<td style="text-align: right" class="edittext"> <td style="text-align: right" class="edittext">
<label for="pdflanguage">[{oxmultilang ident="D3_PDFDOCUMENTS_LANGUAGE" suffix="COLON"}]</label> <label for="pdflanguage">[{oxmultilang ident="D3_PDFDOCUMENTS_LANGUAGE" suffix="COLON"}]</label>
<select id="pdflanguage" name="pdflanguage" class="saveinnewlanginput" style="width:80px;"> <select id="pdflanguage" name="pdflanguage" class="saveinnewlanginput" style="width:150px;">
[{foreach from=$alangs key=lang item=slang}] [{foreach from=$alangs key=lang item=slang}]
<option value="[{$lang}]" [{if $lang == "0"}]SELECTED[{/if}]>[{$slang}]</option> <option value="[{$lang}]" [{if $lang == "0"}]SELECTED[{/if}]>[{$slang}]</option>
[{/foreach}] [{/foreach}]
@ -35,8 +39,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: right" class="edittext"><br/> <td style="text-align: right" class="edittext" colspan="2"><br/>
<input type="submit" class="edittext" name="save" value="[{oxmultilang ident="D3_PDFDOCUMENTS_PDF_GENERATE"}]"> [{if $devmode}]
<input type="submit" class="edittext" name="save" value="[{oxmultilang ident="D3_PDFDOCUMENTS_SGML_GENERATE"}]" onclick="document.getElementById('devmode').value = 1;">
[{/if}]
<input type="submit" class="edittext" name="save" value="[{oxmultilang ident="D3_PDFDOCUMENTS_PDF_GENERATE"}]" [{if $devmode}] onclick="document.getElementById('devmode').value = 0;"[{/if}]>
<iframe name="d3ExpPDF" style="width: 0; height: 0; border: none; display:none;"></iframe> <iframe name="d3ExpPDF" style="width: 0; height: 0; border: none; display:none;"></iframe>
</td> </td>
</tr> </tr>

View File

@ -10,7 +10,24 @@
[{/foreach}] [{/foreach}]
</style> </style>
<page backtop="[{$pagePadding.0}]mm" backright="[{$pagePadding.1}]mm" backbottom="[{$pagePadding.2}]mm" backleft="[{$pagePadding.3}]mm" pageset="[{$pageset}]" orientation="[{$orientation}]" format="[{$format}]"> <page
[{block name="pageSettings"}]
backtop="[{$pagePadding.0}]mm"
backright="[{$pagePadding.1}]mm"
backbottom="[{$pagePadding.2}]mm"
backleft="[{$pagePadding.3}]mm"
pageset="[{$pageset}]"
orientation="[{$orientation}]"
format="[{$format}]"
[{if $showLogo && $config->getConfigParam('d3PdfDocumentsBackgroundUrl')}]
backimg="[{$config->getConfigParam('d3PdfDocumentsBackgroundUrl')}]"
[{/if}]
[{* backcolor="#FFF" *}]
[{* backimgx="center" *}]
[{* backimgy="middle" *}]
[{* backimgw="100%" *}]
[{/block}]
>
<page_header> <page_header>
[{foreach from=$pdfBlock_header item="_block"}] [{foreach from=$pdfBlock_header item="_block"}]
[{$_block}] [{$_block}]

View File

@ -19,9 +19,15 @@
[{block name="pdfFooterCenter"}] [{block name="pdfFooterCenter"}]
<td class="footerCenter"> <td class="footerCenter">
<div>[{oxmultilang ident="D3_PDFDOCUMENTS_MANAGINGDIRECTOR" suffix="COLON"}] [{$shop->getFieldData('oxfname')}] [{$shop->getFieldData('oxlname')}]</div> <div>[{oxmultilang ident="D3_PDFDOCUMENTS_MANAGINGDIRECTOR" suffix="COLON"}] [{$shop->getFieldData('oxfname')}] [{$shop->getFieldData('oxlname')}]</div>
[{if $shop->getFieldData('oxcourt')}]
<div>[{oxmultilang ident="D3_PDFDOCUMENTS_COURT" suffix="COLON"}] [{$shop->getFieldData('oxcourt')}]</div> <div>[{oxmultilang ident="D3_PDFDOCUMENTS_COURT" suffix="COLON"}] [{$shop->getFieldData('oxcourt')}]</div>
[{/if}]
[{if $shop->getFieldData('oxhrbnr')}]
<div>[{oxmultilang ident="D3_PDFDOCUMENTS_HRBNR" suffix="COLON"}] [{$shop->getFieldData('oxhrbnr')}]</div> <div>[{oxmultilang ident="D3_PDFDOCUMENTS_HRBNR" suffix="COLON"}] [{$shop->getFieldData('oxhrbnr')}]</div>
[{/if}]
[{if $shop->getFieldData('oxvatnumber')}]
<div>[{oxmultilang ident="D3_PDFDOCUMENTS_USTID" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}]</div> <div>[{oxmultilang ident="D3_PDFDOCUMENTS_USTID" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}]</div>
[{/if}]
</td> </td>
[{/block}] [{/block}]
[{block name="pdfFooterRight"}] [{block name="pdfFooterRight"}]

View File

@ -6,7 +6,8 @@
[{* pdf logo is available only in non admin theme *}] [{* pdf logo is available only in non admin theme *}]
[{assign var="isAdmin" value=$viewConfig->isAdmin()}] [{assign var="isAdmin" value=$viewConfig->isAdmin()}]
[{$viewConfig->setAdminMode(false)}] [{$viewConfig->setAdminMode(false)}]
<img class="logo" alt="Logo" src="[{$viewConfig->getImageUrl('pdf_logo.jpg')}]"> [{assign var="logoUrl" value=$config->getConfigParam('d3PdfDocumentsLogoUrl')|default:$viewConfig->getImageUrl('pdf_logo.jpg')}]
<img class="logo" alt="Logo" src="[{$logoUrl}]">
[{$viewConfig->setAdminMode($isAdmin)}] [{$viewConfig->setAdminMode($isAdmin)}]
[{/if}] [{/if}]
</div> </div>

View File

@ -11,9 +11,11 @@
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] [{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}]
[{oxmultilang ident="D3_PDFDOCUMENTS_DATE" suffix="COLON"}] [{$order->getFieldData('oxbilldate')|date_format:$dateFormat}] [{oxmultilang ident="D3_PDFDOCUMENTS_DATE" suffix="COLON"}] [{$order->getFieldData('oxbilldate')|date_format:$dateFormat}]
</div> </div>
[{if $shop->getFieldData('oxvatnumber')}]
<div> <div>
[{oxmultilang ident="D3_PDFDOCUMENTS_USTIDNR" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}] [{oxmultilang ident="D3_PDFDOCUMENTS_USTIDNR" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}]
</div> </div>
[{/if}]
[{/block}] [{/block}]
</div> </div>
[{/block}] [{/block}]

View File

@ -2,8 +2,7 @@
[{if $payment->getId() == 'oxidinvoice'}] [{if $payment->getId() == 'oxidinvoice'}]
[{block name="payinfo_billable_till"}] [{block name="payinfo_billable_till"}]
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] [{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}]
[{oxmultilang ident="D3_PDFDOCUMENTS_PAYABLEUNTIL"}] [{oxmultilang ident="D3_PDFDOCUMENTS_PAYABLEUNTIL" args=$document->getPayableUntilDate()|date_format:$dateFormat}]
[{$document->getPayableUntilDate()|date_format:$dateFormat}]
[{/block}] [{/block}]
[{elseif $payment->getId() == 'oxidpayadvance' || $payment->getId() == 'oxidcreditcard'}] [{elseif $payment->getId() == 'oxidpayadvance' || $payment->getId() == 'oxidcreditcard'}]
[{block name="payinfo_payed"}] [{block name="payinfo_payed"}]

View File

@ -8,7 +8,7 @@ Erstellen Sie unterschiedliche statische oder dynamische PDF-Dokumente auf Kopfd
An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung.
Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. Auch komplett andere Dokumentarten (z.B. Artikeldatenblätter) sind einfach möglich. Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder neue hinzuzufügen. Auch komplett andere Dokumentarten (z.B. Artikeldatenblätter) sind einfach möglich.
## Systemanforderungen: ## Systemanforderungen:

View File

@ -95,6 +95,40 @@ $aModule = [
'group' => $sModuleId.'main', 'group' => $sModuleId.'main',
'name' => $sModuleId.'basicAuthPassword', 'name' => $sModuleId.'basicAuthPassword',
'type' => 'password' 'type' => 'password'
],
[
'group' => $sModuleId.'contents',
'name' => $sModuleId.'LogoUrl',
'type' => 'str'
],
[
'group' => $sModuleId.'contents',
'name' => $sModuleId.'BackgroundUrl',
'type' => 'str'
],
[
'group' => $sModuleId.'documents',
'name' => $sModuleId.'DocInvoice',
'type' => 'bool',
'value' => true
],
[
'group' => $sModuleId.'documents',
'name' => $sModuleId.'DocInvoiceNoLogo',
'type' => 'bool',
'value' => true
],
[
'group' => $sModuleId.'documents',
'name' => $sModuleId.'DocDeliveryNote',
'type' => 'bool',
'value' => true
],
[
'group' => $sModuleId.'documents',
'name' => $sModuleId.'DocDeliveryNoteNoLogo',
'type' => 'bool',
'value' => true
] ]
] ]
]; ];