На форуме долго искал, так и не нашел такого модуля. Может не умею пользоваться поиском :(
В файле catalogmodelaccountcustomer.php
if (!$customer_group_info['approval']) {
$message .= $this->language->get('text_login') . "n";
} else {
$message .= $this->language->get('text_approval') . "n";
}
$message .= $this->url->link('account/login', '', 'SSL') . "nn";
$message .= $this->language->get('text_services') . "nn";
$message .= $this->language->get('text_thanks') . "n";
$message .= $this->config->get('config_name');
Заменяем на
if (!$customer_group_info['approval']) {
$message .= $this->language->get('text_login') . "n";
} else {
$message .= $this->language->get('text_approval') . "n";
$message .= $this->language->get('text_code');
$message .= $this->url->link('account/success')."&uid=".base64_encode($data['email'])."n";
}
$message .= $this->language->get('text_services') . "nn";
$message .= $this->language->get('text_thanks') . "n";
$message .= $this->config->get('config_name');
В файл cataloglanguagerussianmailcustomer.php добавляем
$_['text_code'] = 'Ссылка для подтверждения регистрации:';
В файле catalogcontrolleraccountsuccess.php
if ($customer_group && !$customer_group['approval']) {
$this->data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));
} else {
$this->data['text_message'] = sprintf($this->language->get('text_approval'), $this->config->get('config_name'), $this->url->link('information/contact'));
}
Заменяем на
if ($customer_group && !$customer_group['approval']) {
$this->data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));
} else {
if (isset($_REQUEST['uid'])) {
$mail_get = base64_decode($_REQUEST['uid']);
$this->db->query("UPDATE `oc_customer` SET `approved`=1 WHERE `email`='".$mail_get."' LIMIT 1");
$this->language->load('mail/customer');
$subject = sprintf($this->language->get('text_subject'), $this->config->get('config_name'));
$message = sprintf($this->language->get('text_welcome'), $this->config->get('config_name')) . "nn";
$message .= $this->language->get('text_login') . "n";
$message .= $this->url->link('account/login', '', 'SSL') . "nn";
$message .= $this->language->get('text_services') . "nn";
$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($mail_get);
$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();
$this->data['text_message'] = sprintf($this->language->get('text_message'), $this->config->get('config_name'), $this->url->link('information/contact'));
} else {
$this->data['text_message'] = sprintf($this->language->get('text_approval'), $this->config->get('config_name'), $this->url->link('information/contact'));
}
}