Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions Core/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

use OxidEsales\Eshop\Core\Registry;
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;

class Email extends Email_parent
{

public function sendOrderEmailToOwner($order, $subject = null)
{
$config = Registry::getConfig();
Expand All @@ -44,6 +44,7 @@ public function sendOrderEmailToOwner($order, $subject = null)
// send not pretending from order user, as different email domain rise spam filters

// Original: $this->setFrom($shop->oxshops__oxowneremail->value);
$sFullName = '';
if ($user->oxuser__oxcompany->value) {
$sFullName = $user->oxuser__oxcompany->getRawValue() . ' | ';
}
Expand All @@ -63,7 +64,9 @@ public function sendOrderEmailToOwner($order, $subject = null)
$this->setSmtp($shop);

// create messages
$renderer = $this->getRenderer();
$container = ContainerFactory::getInstance()->getContainer();
$bridge = $container->get(TemplateRendererBridgeInterface::class);
$renderer = $bridge->getTemplateRenderer();
$this->setViewData("order", $order);

// Process view data array through oxoutput processor
Expand Down Expand Up @@ -121,12 +124,4 @@ public function sendContactMail($emailAddress = null, $subject = null, $message
$this->setReplyTo($emailAddress, "");
return $this->send();
}

private function getRenderer()
{
$bridge = $this->getContainer()->get(TemplateRendererBridgeInterface::class);
$bridge->setEngine($this->_getSmarty());

return $bridge->getTemplateRenderer();
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"require": {
"oxid-esales/oxideshop-ce": ">=6.5 <6.10"
"oxid-esales/oxideshop-ce": "v6.x"
},
"autoload": {
"psr-4": {
Expand Down