Кастомная Форма в opencart 3.x

Тема в разделе "Общие вопросы", создана пользователем Gagger, 12 дек 2017.

  1. Gagger

    Gagger Новичок

    Сообщения:
    27
    Симпатии:
    0
    Решил проблему:
    В отправке мейла -
    PHP:
    if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
                
            if (isset(
    $this->request->post['noprinter'])) {
                
    $noprinter $this->request->post['noprinter'];
            } else {
                
    $noprinter '';
            }
            if (isset(
    $this->request->post['hpress'])) {
                
    $hpress $this->request->post['hpress'];
            } else {
                
    $hpress '';
            }
                
    $mail = new Mail($this->config->get('config_mail_engine'));
                
    $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->setReplyTo($this->request->post['email']);
                
    $mail->setSender(html_entity_decode($this->request->post['name'], ENT_QUOTES'UTF-8'));
                
    $mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES'UTF-8'));
                
    $mail->setText($this->request->post['enquiry'] . $this->request->post['country'] . $this->request->post['zip'] . $this->request->post['link'] . $this->request->post['printer'] . $noprinter $this->request->post['size'] . $hpress);
                
    $mail->send();

                
    $this->response->redirect($this->url->link('information/contact/success'));
            }
     
  2. Ravilr

    Ravilr Специалист

    Сообщения:
    4.202
    Симпатии:
    1.448