Open cart extension tell a friend it's not working

Hi I have installed the opencart extension, tell a friend that everything is fine, but the email does not send all emails when the customer registry is registered and bought, please tell me the reason

there is a link to the extension here http://www.opencart.com/index.php?route=extension/extension/info&extension_id=4348&filter_search=tell%20a%20friend

If anyone has used this one please tell me

+3


source to share


1 answer


for a while Opencart does not work with emails on models. you need to put your logic in a controller to fix this issue.

here is the solution: get all the value in your Opencart controller function and enable the email logic function like this.



$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->request->post['email']);

           $mail->setSender($this->request->post['name']);

           $mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));

           $mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));

           $mail->send();

      

+1


source







All Articles