Open up catalog/model/account/customer.php
In the function addCustomer which is the function at the very top, find this chunk of code:
Find this line:
You can choose to comment out the entire block, or just the line that reads $mail->send(); I would comment out the entire block.
In the function addCustomer which is the function at the very top, find this chunk of code:
Find this line:
Code: Select all
$subject = sprintf($this->language->get('text_subject'), $this->config->get('config_name'));
$message = sprintf($this->language->get('text_welcome'), $this->config->get('config_name')) . "\n\n";
if (!$this->config->get('config_customer_approval')) {
$message .= $this->language->get('text_login') . "\n";
} else {
$message .= $this->language->get('text_approval') . "\n";
}
$message .= $this->url->link('account/login', '', 'SSL') . "\n\n";
$message .= $this->language->get('text_services') . "\n\n";
$message .= $this->language->get('text_thanks') . "\n";
$message .= $this->config->get('config_name');
$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($data['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send();
Code: Select all
/*$subject = sprintf($this->language->get('text_subject'), $this->config->get('config_name'));
$message = sprintf($this->language->get('text_welcome'), $this->config->get('config_name')) . "\n\n";
if (!$this->config->get('config_customer_approval')) {
$message .= $this->language->get('text_login') . "\n";
} else {
$message .= $this->language->get('text_approval') . "\n";
}
$message .= $this->url->link('account/login', '', 'SSL') . "\n\n";
$message .= $this->language->get('text_services') . "\n\n";
$message .= $this->language->get('text_thanks') . "\n";
$message .= $this->config->get('config_name');
$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($data['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send(); */
Confirmed this worked in Opencart 2.2.0.0can anyone help how to do this on opencart 2.0 version?
Use /* and */ at the beginning of lines 26 and 56.
Hello Williamhazel,williamhazel wrote:Confirmed this worked in Opencart 2.2.0.0can anyone help how to do this on opencart 2.0 version?
Use /* and */ at the beginning of lines 26 and 56.
I couldn't get it to work by commenting on the entire code and I'm trying to see if I did it right.
When you say line 26, are you referring to :
Code: Select all
$subject = sprintf($this->language->get('text_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
Code: Select all
$mail->setTo($data['email']);
Your help is much appreciated. I'm trying to disabling the default registration confirmation email as I'm using an Email Verification extension.
Thanks,
B
BeeBee
When the going gets weird, the weird turn Pro!!
Who is online
Users browsing this forum: No registered users and 61 guests