Коллеги, добрый день.
Сделал форму обратной связи, но не могу понять, почему не работает поле "Сообщение"
Форма в верстке выглядит так:
<form id="uprice-form" data-formid="modalsviaz" class="request-form" method="post" action="index.php?route=module/findprice/sviaz">
<div style="display:none">
<input id="pred_email" type="text" name="admin_email" value="vlas.dmitrenko@gmail.com">
</div>
<div style="display:none">
<input id="pred_product" type="text" name="product">
<input id="pred_productid" type="text" name="productid">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin: 10px 0;">
<input id="order_popup_name" type="text" placeholder="Ваше имя" name="nameu" required="">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin: 10px 0;">
<input id="order_popup_phoneu" type="text" placeholder="Ваш телефон" name="phoneu">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin: 10px 0;">
<input id="order_emails" type="email" placeholder="Ваш Email" name="emailu" required="">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin: 10px 0;">
<input id="order_popup_name" type="text" placeholder="VIN" name="vinu" required="">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin: 10px 0;">
<input id="order_popup_message" type="text" placeholder="Сообщение" name="messageu" required="">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<input type="submit" class="buyone" value="Отправить" data-wait-text="Отправка">
</div>
</form>
Сам php обработчик выглядит так:
public function sviaz() {
$order = $this->request->post;
$order['ip'] = html_entity_decode($this->request->server['REMOTE_ADDR'], ENT_QUOTES, 'UTF-8');
$order['dates']=time();
$this->language->load('module/findprice');
$this->load->model('module/findprice');
$this->model_module_findprice->addFind($order);
$email_subject = 'Сделать заказ';
$email_text = $this->language->get('text_order'). "\n\n";
$email_text .= sprintf($this->language->get('text_date_order'), date('d.m.Y H:i:s'), ENT_QUOTES, 'UTF-8') . "\n";
$email_text .= sprintf($this->language->get('text_ip'), $order['ip']) . "\n";
$email_text .= "<p>VIN ".$order['vinu']."\n";
if(isset($order['nameu']))
$email_text .= sprintf($this->language->get('text_name'), html_entity_decode($order['nameu'], ENT_QUOTES, 'UTF-8')) . "\n";
$email_text .= sprintf($this->language->get('text_email'), html_entity_decode($order['emailu'], ENT_QUOTES, 'UTF-8')) . "\n";
$email_text .= sprintf($this->language->get('text_message'), html_entity_decode($order['messageu'], ENT_QUOTES, 'UTF-8')) . "\n";
if(isset($order['phoneu']))$email_text .= sprintf($this->language->get('text_phone'), html_entity_decode($order['phoneu'], ENT_QUOTES, '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($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->setSubject($email_subject);
$mail->setHtml($email_text);
$mail->send();
}
Как быть? Письмо приходит в таком виде:
Дата: 09.12.2017 18:27:29
VIN 123123123
Имя: Влас
E-mail: test@gmail.com
text_message
Телефон: 123123123