Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Отправка дополнительного письма при заказе.


Recommended Posts

Доброго времени суток!

Возникла потребность отправлять покупателю смс при создании заказа. Для этого на смс-гейт отправляется короткое письмо вида

[telephone] [order_id] [total_sum]

все мои криворукие потуги к самостоятельному решению задачи привели к вставке кода в catalog/model/checkout/order.php

           	 // SMS Alert Mail
               if ($this->config->get('config_alert_mail')) {
               $text .= 'telephone: ' . $order_info['telephone'] . ", ";
               $text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
               $text .= $result['quantity'] . 'x ' . $result['name'] . ' (' . $result['model'] . ') ' . html_entity_decode($this->currency->format($result['total'], $order_info['currency_code'], $order_info['currency_value']), ENT_NOQUOTES, 'UTF-8') . "\n";
               }

               $mail = new Mail();
               $mail->protocol = $this->config->get('config_mail_protocol');
               $mail->parameter = $this->config->get('config_mail_parameter');
               $mail->hostname = $this->config->get('config_smtp_host');
               $mail->username = $this->config->get('config_smtp_username');
               $mail->password = $this->config->get('config_smtp_password');
               $mail->port = $this->config->get('config_smtp_port');
               $mail->timeout = $this->config->get('config_smtp_timeout');
               $mail->setTo('[email protected]');
               $mail->setFrom($this->config->get('config_email'));
               $mail->setSender($order_info['store_name']);
               $mail->setSubject($subject);
               $mail->setHtml($html);
               $mail->send();
               // SMS Alert Mail end

само соой разумеется, никакого письма никуда не ушло =(

прошу помочь разобраться с этой проблемой

Link to comment
Share on other sites


  • 8 months later...

апну тему...

 

в ОС 1551 убрана возможность отправки смс вообще, а с ней было довольно-таки неплохо... как можно реализовать отправку е-маил на заранее указанный адрес с номером телефона в теме и номером заказа и суммой в теле?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.