Magento2 在magento 2中添加两封或更多电子邮件以确认订单
我正在处理订单部分,现在我想在magento 2.1.5版本中添加一封或多封电子邮件以接收订单电子邮件。我正在尝试在文件中添加代码。 vendor/magento/module quote/Model/QuoteManagement.php 475$order->setCustomerEmail($quote->getCustomerEmail()) 使用is代码,我得到objectManager | magento\frmework\app\objectManager错误 另外Magento2 在magento 2中添加两封或更多电子邮件以确认订单,magento2,Magento2,我正在处理订单部分,现在我想在magento 2.1.5版本中添加一封或多封电子邮件以接收订单电子邮件。我正在尝试在文件中添加代码。 vendor/magento/module quote/Model/QuoteManagement.php 475$order->setCustomerEmail($quote->getCustomerEmail()) 使用is代码,我得到objectManager | magento\frmework\app\objectManager错误 另外 当我在$ord
当我在$order->setCustomerEmail(“test@gmail.com“,$quote->getCustomerEmail());像代码,然后我将只发送电子邮件第一个电子邮件地址,它不会选择第二个电子邮件地址参数,任何人都可以帮助我解决它。谢谢您可以在“管理”中的 商店->配置->销售->销售电子邮件->订单
在“发送订单电子邮件副本到输入”字段中,插入多个以逗号分隔的电子邮件id,订单电子邮件也将发送到这些电子邮件。谢谢您的回复,但我的问题与代码中的实际意思有关,因为我想添加一封动态电子邮件,我想从自定义模块数据库表中获取该电子邮件。与此文件类似(vendor/magento/module quote/Model/QuoteManagement.php),其中有一个选项,但我无法修复该错误。请帮帮我。。
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$connection = $objectManager->get('Magento\Framework\App\ResourceConnection')->getConnection('\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION');
$result1 = $connection->fetchAll(" SELECT *
FROM `mg1_customer_entity_varchar` WHERE `entity_id` = '$suser_id' ");
$customemail = $result1[0]['value'];
$order->setCustomerEmail($customemail ,$quote->getCustomerEmail());
$order->setCustomerFirstname($quote->getCustomerFirstname());
$order->setCustomerMiddlename($quote->getCustomerMiddlename());
$order->setCustomerLastname($quote->getCustomerLastname());