W
W
wowastrom2018-07-19 22:18:29
opencart
wowastrom, 2018-07-19 22:18:29

Why doesn't the email template for opencart 2.3.0.2 admin change?

Save the people, I do not understand what the problem is.
The task is essentially simple, I have a custom field and, depending on the value of the field, a letter about a new order should come to the admin in different mailboxes. I went through the documentation and as far as I understood, changes should be made to the \catalog\model\checkout\order.php file. And as I understand it, you need to look at the following code:

$mail = new Mail();
          $mail->protocol = $this->config->get('config_mail_protocol');
          $mail->parameter = $this->config->get('config_mail_parameter');
          $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
          $mail->smtp_username = $this->config->get('config_mail_smtp_username');
          $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
          $mail->smtp_port = $this->config->get('config_mail_smtp_port');
          $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
  
          $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($subject, ENT_QUOTES, 'UTF-8'));
          $mail->setHtml($this->load->view('mail/order', $data));
          $mail->setText($text);
          $mail->send();
  
          // Send to additional alert emails
          $emails = explode(',', $this->config->get('config_alert_email'));
  
          foreach ($emails as $email) {
            if ($email && filter_var($email, FILTER_VALIDATE_EMAIL)) {
              $mail->setTo($email);
              $mail->send();
            }

BUT making changes and saving the file they are not applied. Even more so if I clean it completely, or the system\library\mail.php file still works, although in theory it should throw an error. But the letters are calmly sent. I cleaned and updated Modifiers and cleared cache in system\storage\cache folder (except for index.html file), but it didn't help. In short, I'm completely confused. What could be the problem ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question