change small syntax issues

This commit is contained in:
Daniel Seifert 2020-07-02 10:35:56 +02:00
parent c28e7c3f45
commit 5f9587413a
7 changed files with 30 additions and 105 deletions

View File

@ -139,8 +139,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
public function setSmartyVars($iSelLang)
{
unset($iSelLang);
$this->oSmarty->assign('oConfig', Registry::getSession()->getConfig());
$this->oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig());
$this->oSmarty->assign('config', Registry::getSession()->getConfig());
$this->oSmarty->assign('viewConfig', Registry::getSession()->getConfig()->getActiveView()->getViewConfig());
$this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop());
$this->oSmarty->assign('lang', Registry::getLang());
$this->oSmarty->assign('document', $this);

View File

@ -1,14 +1,14 @@
[{if $edit && $oView->canExport()}]
<br>
<form name="myedit2" id="myedit2" action="[{$oViewConf->getSelfLink()}]" method="post" target="expPDF">
[{$oViewConf->getHiddenSid()}]
<form name="myedit2" id="myedit2" action="[{$viewConfig->getSelfLink()}]" method="post" target="expPDF">
[{$viewConfig->getHiddenSid()}]
<input type="hidden" name="cl" value="order_overview">
<input type="hidden" name="fnc" value="createPDF">
<input type="hidden" name="oxid" value="[{$oxid}]">
<table style="border-spacing: 0;border-collapse: collapse;padding: 5px;border : 1px #A9A9A9 solid; width:220px">
<tr>
<td rowspan="3">
<img src="[{$oViewConf->getImageUrl()}]/pdf_icon.gif" width="41" height="38" alt="" border="0" hspace="0" vspace="0" align="absmiddle">
<img src="[{$viewConfig->getImageUrl()}]/pdf_icon.gif" width="41" height="38" alt="" border="0" hspace="0" vspace="0" align="absmiddle">
</td>
<td valign="top" class="edittext" align="right">
[{oxmultilang ident="ORDER_OVERVIEW_PDF_TYPE"}]:&nbsp;

View File

@ -89,7 +89,7 @@
[{/if}]
[{block name="delivery"}]
[{if $oConfig->getConfigParam('blShowVATForDelivery')}]
[{if $config->getConfigParam('blShowVATForDelivery')}]
[{assign var="deliveryPrice" value=$order->getOrderDeliveryPrice()}]
<tr class="delivery">
<td class="indent"></td>
@ -103,7 +103,7 @@
<tr class="deliverytax">
<td class="indent"></td>
<td class="description">
[{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}]
[{if $config->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}]
[{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxdelvat') suffix="COLON"}]
[{else}]
[{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}]
@ -127,7 +127,7 @@
[{/block}]
[{block name="payment"}]
[{if $oConfig->getConfigParam('blShowVATForPayCharge')}]
[{if $config->getConfigParam('blShowVATForPayCharge')}]
[{assign var="paymentPrice" value=$order->getOrderPaymentPrice()}]
<tr class="payment">
<td class="indent"></td>
@ -141,7 +141,7 @@
<tr class="paymenttax">
<td class="indent"></td>
<td class="description">
[{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}]
[{if $config->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}]
[{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxpayvat') suffix="COLON"}]
[{else}]
[{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}]
@ -166,7 +166,7 @@
[{block name="wrapping"}]
[{if $order->getFieldData('oxwrapcost')}]
[{if $oConfig->getConfigParam('blShowVATForWrapping')}]
[{if $config->getConfigParam('blShowVATForWrapping')}]
[{assign var="wrappingPrice" value=$order->getOrderWrappingPrice()}]
<tr class="wrapping">
<td class="indent"></td>
@ -202,7 +202,7 @@
[{block name="giftcard"}]
[{if $order->getFieldData('oxgiftcardcost')}]
[{if $oConfig->getConfigParam('blShowVATForWrapping')}]
[{if $config->getConfigParam('blShowVATForWrapping')}]
[{assign var="giftCardPrice" value=$order->getOrderGiftCardPrice()}]
<tr class="giftcard">
<td class="indent"></td>

View File

@ -22,102 +22,27 @@
</th>
[{/if}]
</tr>
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
[{foreach from=$order->getOrderArticles(true) item=orderArticle}]
<tr>
<td class="amount">
[{$oOrderArticle->oxorderarticles__oxamount->value }]
[{$orderArticle->getFieldData('oxamount')}]
</td>
<td class="description">
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
[{$orderArticle->getFieldData('oxtitle')}] [{ $orderArticle->getFieldData('oxselvariant')}]
<br>
<span class="artnr">
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$orderArticle->getFieldData('oxartnum')}]
</span>
</td>
[{if $showPrices}]
<td class="tax">
[{$oOrderArticle->oxorderarticles__oxvat->value }]
[{$orderArticle->getFieldData('oxvat')}]
</td>
<td class="unitPrice">
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$orderArticle->getBrutPriceFormated()}] [{$currency->name}]
</td>
<td class="totalPrice">
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
</td>
[{/if}]
</tr>
[{/foreach}]
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
<tr>
<td class="amount">
[{$oOrderArticle->oxorderarticles__oxamount->value }]
</td>
<td class="description">
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
<br>
<span class="artnr">
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]
</span>
</td>
[{if $showPrices}]
<td class="tax">
[{$oOrderArticle->oxorderarticles__oxvat->value }]
</td>
<td class="unitPrice">
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
</td>
<td class="totalPrice">
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
</td>
[{/if}]
</tr>
[{/foreach}]
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
<tr>
<td class="amount">
[{$oOrderArticle->oxorderarticles__oxamount->value }]
</td>
<td class="description">
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
<br>
<span class="artnr">
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]
</span>
</td>
[{if $showPrices}]
<td class="tax">
[{$oOrderArticle->oxorderarticles__oxvat->value }]
</td>
<td class="unitPrice">
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
</td>
<td class="totalPrice">
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
</td>
[{/if}]
</tr>
[{/foreach}]
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
<tr>
<td class="amount">
[{$oOrderArticle->oxorderarticles__oxamount->value }]
</td>
<td class="description">
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
<br>
<span class="artnr">
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]
</span>
</td>
[{if $showPrices}]
<td class="tax">
[{$oOrderArticle->oxorderarticles__oxvat->value }]
</td>
<td class="unitPrice">
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
</td>
<td class="totalPrice">
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
[{$orderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
</td>
[{/if}]
</tr>

View File

@ -7,12 +7,12 @@
<tr>
[{block name="pdfFooterLeft"}]
<td class="footerLeft">
<div>[{$shop->oxshops__oxname->value}]</div>
<div>[{$shop->oxshops__oxstreet->value}]</div>
<div>[{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]</div>
<div>[{$shop->oxshops__oxcountry->value}]</div>
<div>[{$shop->oxshops__oxurl->value}]</div>
<div>[{$shop->oxshops__oxinfoemail->value}]</div>
<div>[{$shop->getFieldData('oxname')}]</div>
<div>[{$shop->getFieldData('oxstreet')}]</div>
<div>[{$shop->getFieldData('oxzip')}] [{$shop->getFieldData('oxcity')}]</div>
<div>[{$shop->getFieldData('oxcountry')}]</div>
<div>[{$shop->getFieldData('oxurl')}]</div>
<div>[{$shop->getFieldData('oxinfoemail')}]</div>
</td>
[{/block}]
[{block name="pdfFooterCenter"}]

View File

@ -4,10 +4,10 @@
<div class="header">
[{if $showLogo}]
[{* pdf logo is available only in non admin theme *}]
[{assign var="isAdmin" value=$oViewConf->isAdmin()}]
[{$oViewConf->setAdminMode(false)}]
<img class="logo" alt="Logo" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]">
[{$oViewConf->setAdminMode($isAdmin)}]
[{assign var="isAdmin" value=$viewConfig->isAdmin()}]
[{$viewConfig->setAdminMode(false)}]
<img class="logo" alt="Logo" src="[{$viewConfig->getImageUrl('pdf_logo.jpg')}]">
[{$viewConfig->setAdminMode($isAdmin)}]
[{/if}]
</div>
[{/block}]

View File

@ -42,8 +42,8 @@ $aModule = [
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => [
OxidModel\Order::class => d3_pdfdocs_OrderModel::class,
OrderOverview::class => d3_overview_controller_pdfdocuments::class
OxidModel\Order::class => d3_pdfdocs_OrderModel::class,
OrderOverview::class => d3_overview_controller_pdfdocuments::class
],
'controllers' => [],
'templates' => [