73 $this->identityContainer->setStore(
$order->getStore());
74 if (!$this->identityContainer->isEnabled()) {
84 $sender->sendCopyTo();
85 }
catch (\Exception $e) {
86 $this->logger->error($e->getMessage());
103 $templateId = $this->identityContainer->getGuestTemplateId();
104 $customerName =
$order->getBillingAddress()->getName();
106 $templateId = $this->identityContainer->getTemplateId();
107 $customerName =
$order->getCustomerName();
110 $this->identityContainer->setCustomerName($customerName);
111 $this->identityContainer->setCustomerEmail(
$order->getCustomerEmail());
112 $this->templateContainer->setTemplateId(
$templateId);
120 return $this->senderBuilderFactory->create(
122 'templateContainer' => $this->templateContainer,
123 'identityContainer' => $this->identityContainer,
135 'store' => $this->identityContainer->getStore()->getStoreId()
145 return $order->getIsVirtual()
147 : $this->addressRenderer->format(
$order->getShippingAddress(),
'html');
156 return $this->addressRenderer->format(
$order->getBillingAddress(),
'html');
prepareTemplate(Order $order)
__construct(Template $templateContainer, IdentityInterface $identityContainer, \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory, \Psr\Log\LoggerInterface $logger, Renderer $addressRenderer)
getFormattedShippingAddress($order)
getFormattedBillingAddress($order)