change fox OXID 6.2 explicit
This commit is contained in:
bovenliggende
d1c1ba90b8
commit
eac41bc94d
|
@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2.1.0.0 (2020-11-11)
|
||||||
|
### Changed
|
||||||
|
- Modul verwendbar in OXID 6.2
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 2.0.1.0 (2019-10-21)
|
## 2.0.1.0 (2019-10-21)
|
||||||
### Changed
|
### Changed
|
||||||
- Mails können auch Dreingabeartikel regenerieren und darstellen
|
- Mails können auch Dreingabeartikel regenerieren und darstellen
|
||||||
|
|
BIN
README.md
BIN
README.md
Binair bestand niet weergegeven.
|
@ -30,8 +30,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6",
|
"oxid-esales/oxideshop-ce": "6.5 - 6.5"
|
||||||
"oxid-esales/oxideshop-ce": "6.0 - 6.5"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
|
@ -71,6 +71,7 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
||||||
*/
|
*/
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
$currentClass = '';
|
||||||
if ($this->d3DevCanShowThankyou()) {
|
if ($this->d3DevCanShowThankyou()) {
|
||||||
$currentClass = $this->getViewConfig()->getViewConfigParam('cl');
|
$currentClass = $this->getViewConfig()->getViewConfigParam('cl');
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,9 @@ namespace D3\Devhelper\Modules\Core;
|
||||||
use D3\Devhelper\Modules\Application\Model as ModuleModel;
|
use D3\Devhelper\Modules\Application\Model as ModuleModel;
|
||||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Smarty\Bridge\SmartyTemplateRendererBridge;
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererInterface;
|
||||||
use Smarty;
|
|
||||||
|
|
||||||
class d3_dev_oxemail extends d3_dev_oxemail_parent
|
class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
{
|
{
|
||||||
|
@ -87,16 +86,8 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
// Process view data array through oxoutput processor
|
// Process view data array through oxoutput processor
|
||||||
$this->_processViewArray();
|
$this->_processViewArray();
|
||||||
|
|
||||||
if (class_exists(SmartyTemplateRendererBridge::class)) {
|
$renderer = $this->getRenderer();
|
||||||
$renderer = $this->getRenderer();
|
return $renderer->renderTemplate($myConfig->getTemplatePath($sTpl, false), $this->getViewData());
|
||||||
$ret = $renderer->renderTemplate($myConfig->getTemplatePath($sTpl, false), $this->getViewData());
|
|
||||||
} else {
|
|
||||||
/** @var Smarty $oSmarty */
|
|
||||||
$oSmarty = $this->_getSmarty();
|
|
||||||
$ret = $oSmarty->fetch($myConfig->getTemplatePath($sTpl, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -107,7 +98,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
*/
|
*/
|
||||||
protected function getRenderer()
|
protected function getRenderer()
|
||||||
{
|
{
|
||||||
$bridge = \OxidEsales\EshopCommunity\Internal\Container\ContainerFactory::getInstance()->getContainer()
|
$bridge = ContainerFactory::getInstance()->getContainer()
|
||||||
->get(TemplateRendererBridgeInterface::class);
|
->get(TemplateRendererBridgeInterface::class);
|
||||||
$bridge->setEngine($this->_getSmarty());
|
$bridge->setEngine($this->_getSmarty());
|
||||||
|
|
||||||
|
@ -176,16 +167,27 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
// Process view data array through oxoutput processor
|
// Process view data array through oxoutput processor
|
||||||
$this->_processViewArray();
|
$this->_processViewArray();
|
||||||
|
|
||||||
if (class_exists(SmartyTemplateRendererBridge::class)) {
|
$renderer = $this->getRenderer();
|
||||||
$renderer = $this->getRenderer();
|
return $renderer->renderTemplate($myConfig->getTemplatePath($sTpl, false), $this->getViewData());
|
||||||
$ret = $renderer->renderTemplate($myConfig->getTemplatePath($sTpl, false), $this->getViewData());
|
}
|
||||||
} else {
|
|
||||||
/** @var Smarty $oSmarty */
|
|
||||||
$oSmarty = $this->_getSmarty();
|
|
||||||
$ret = $oSmarty->fetch($myConfig->getTemplatePath($sTpl, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $ret;
|
/**
|
||||||
|
* @param $aRecInfo
|
||||||
|
* @param array $aCc
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function d3ChangeRecipient($aRecInfo, array $aCc): array
|
||||||
|
{
|
||||||
|
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
||||||
|
&& $sNewRecipient != $aRecInfo[0]
|
||||||
|
) {
|
||||||
|
$aRecInfo[1] = $aRecInfo[1] . " (" . $aRecInfo[0] . ")";
|
||||||
|
$aRecInfo[0] = $sNewRecipient;
|
||||||
|
$aCc[] = $aRecInfo;
|
||||||
|
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
||||||
|
$aCc[] = $aRecInfo;
|
||||||
|
}
|
||||||
|
return $aCc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,20 +213,35 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
* @throws StandardException
|
||||||
|
*/
|
||||||
|
protected function sendMail()
|
||||||
|
{
|
||||||
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
|
return parent::sendMail();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->d3clearRecipients();
|
||||||
|
$this->d3clearReplies();
|
||||||
|
$this->d3clearReplyTo();
|
||||||
|
$this->d3clearCC();
|
||||||
|
$this->d3clearBCC();
|
||||||
|
|
||||||
|
if (count($this->getRecipient())) {
|
||||||
|
return parent::sendMail();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function d3clearRecipients()
|
public function d3clearRecipients()
|
||||||
{
|
{
|
||||||
$aRecipients = array();
|
$aRecipients = array();
|
||||||
if (is_array($this->_aRecipients) && count($this->_aRecipients)) {
|
if (is_array($this->_aRecipients) && count($this->_aRecipients)) {
|
||||||
foreach ($this->_aRecipients as $aRecInfo) {
|
foreach ($this->_aRecipients as $aRecInfo) {
|
||||||
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
$aRecipients = $this->d3ChangeRecipient($aRecInfo, $aRecipients);
|
||||||
&& $sNewRecipient != $aRecInfo[0]
|
|
||||||
) {
|
|
||||||
$aRecInfo[1] = $aRecInfo[1]." (".$aRecInfo[0].")";
|
|
||||||
$aRecInfo[0] = $sNewRecipient;
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_aRecipients = $aRecipients;
|
$this->_aRecipients = $aRecipients;
|
||||||
|
@ -235,15 +252,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
$aRecipients = array();
|
$aRecipients = array();
|
||||||
if (is_array($this->_aReplies) && count($this->_aReplies)) {
|
if (is_array($this->_aReplies) && count($this->_aReplies)) {
|
||||||
foreach ($this->_aReplies as $aRecInfo) {
|
foreach ($this->_aReplies as $aRecInfo) {
|
||||||
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
$aRecipients = $this->d3ChangeRecipient($aRecInfo, $aRecipients);
|
||||||
&& $sNewRecipient != $aRecInfo[0]
|
|
||||||
) {
|
|
||||||
$aRecInfo[1] = $aRecInfo[1]." (".$aRecInfo[0].")";
|
|
||||||
$aRecInfo[0] = $sNewRecipient;
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_aReplies = $aRecipients;
|
$this->_aReplies = $aRecipients;
|
||||||
|
@ -254,15 +263,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
$aRecipients = array();
|
$aRecipients = array();
|
||||||
if (is_array($this->ReplyTo) && count($this->ReplyTo)) {
|
if (is_array($this->ReplyTo) && count($this->ReplyTo)) {
|
||||||
foreach ($this->ReplyTo as $aRecInfo) {
|
foreach ($this->ReplyTo as $aRecInfo) {
|
||||||
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
$aRecipients = $this->d3ChangeRecipient($aRecInfo, $aRecipients);
|
||||||
&& $sNewRecipient != $aRecInfo[0]
|
|
||||||
) {
|
|
||||||
$aRecInfo[1] = $aRecInfo[1]." (".$aRecInfo[0].")";
|
|
||||||
$aRecInfo[0] = $sNewRecipient;
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
|
||||||
$aRecipients[] = $aRecInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->ReplyTo = $aRecipients;
|
$this->ReplyTo = $aRecipients;
|
||||||
|
@ -273,15 +274,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
$aCc = array();
|
$aCc = array();
|
||||||
if (is_array($this->cc) && count($this->cc)) {
|
if (is_array($this->cc) && count($this->cc)) {
|
||||||
foreach ($this->cc as $aRecInfo) {
|
foreach ($this->cc as $aRecInfo) {
|
||||||
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
$aCc = $this->d3ChangeRecipient($aRecInfo, $aCc);
|
||||||
&& $sNewRecipient != $aRecInfo[0]
|
|
||||||
) {
|
|
||||||
$aRecInfo[1] = $aRecInfo[1]." (".$aRecInfo[0].")";
|
|
||||||
$aRecInfo[0] = $sNewRecipient;
|
|
||||||
$aCc[] = $aRecInfo;
|
|
||||||
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
|
||||||
$aCc[] = $aRecInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,15 +286,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
$aCc = array();
|
$aCc = array();
|
||||||
if (is_array($this->bcc) && count($this->bcc)) {
|
if (is_array($this->bcc) && count($this->bcc)) {
|
||||||
foreach ($this->bcc as $aRecInfo) {
|
foreach ($this->bcc as $aRecInfo) {
|
||||||
if (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))
|
$aCc = $this->d3ChangeRecipient($aRecInfo, $aCc);
|
||||||
&& $sNewRecipient != $aRecInfo[0]
|
|
||||||
) {
|
|
||||||
$aRecInfo[1] = $aRecInfo[1]." (".$aRecInfo[0].")";
|
|
||||||
$aRecInfo[0] = $sNewRecipient;
|
|
||||||
$aCc[] = $aRecInfo;
|
|
||||||
} elseif (($sNewRecipient = $this->getNewRecipient($aRecInfo[0]))) {
|
|
||||||
$aCc[] = $aRecInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ use OxidEsales\Eshop\Core\Registry;
|
||||||
/**
|
/**
|
||||||
* Metadata version
|
* Metadata version
|
||||||
*/
|
*/
|
||||||
$sMetadataVersion = '2.0';
|
$sMetadataVersion = '2.1';
|
||||||
$sLogo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> ';
|
$sLogo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> ';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Laden…
Verwijs in nieuw issue