By default, in Opencart 2-3.x, a letter about a new order of goods arrives to the site administrator in this form:
In order for the letter to be the same type as it is sent to the buyer, you need to modify the standard functionality.
Open file \catalog\controller\mail\order.php
about 270 string
$mail->setTo($order_info['email']); $mail->setFrom($from); $mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')); $mail->setSubject(html_entity_decode(sprintf($language->get('text_subject'), $order_info['store_name'], $order_info['order_id']), ENT_QUOTES, 'UTF-8')); $mail->setHtml($this->load->view('mail/order_add', $data)); $mail->send();
after that code – paste
$mail->setTo($this->config->get('config_email')); $mail->setFrom($this->config->get('config_email')); $mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')); $mail->setSubject(html_entity_decode(sprintf($this->language->get('text_subject'), $this->config->get('config_name'), $order_info['order_id']), ENT_QUOTES, 'UTF-8')); $mail->setHtml($this->load->view('mail1/order_alert', $data)); $mail->send();
Further, in the directory of your theme or in the folder of the standard theme (option 2 will be in 90% of cases)
\catalog\view\theme\default\template
create the folder mail1, create a file in it called order_alert.twig, the contents of this file will be exactly like in the file
\catalog\view\theme\default\template\mail\order_add.twig
Then, in the admin panel, we update the modifications and in the settings (System – Settings – Mail) we remove the check in the New order so that you would not receive two copies of the letter as the administrator.
As a result, after the order you as a site administrator will receive a detailed letter of this kind: