Es decir, que el admin,reciba un correo para saber que alguien se ha registrado y aprobar al cliente?
Gracias.
In catalog/controller/account/create.php
After:
Code: Select all
$this->data['text_newsletter'] = $this->language->get('text_newsletter');
Add:
$this->data['text_registration'] = $this->language->get('text_registration');
$this->data['text_new_registration'] = $this->language->get('text_new_registration');
After:
$mail->send();
Add:
//Q: Send additional email to store owner.
$this->load->model('localisation/country');
$this->load->model('localisation/zone');
$country = $this->model_localisation_country->getCountry($this->request->post['country_id']);
$zone = $this->model_localisation_zone->getZone($this->request->post['zone_id']);
$subject = $this->language->get('text_registration') . ' ' . $this->request->post['firstname'] . ' ' . $this->request->post['lastname'];
$message = $this->language->get('text_new_registration') . ' ' . $this->config->get('config_name') . '.' . "\n\n";
$message .= $this->language->get('entry_firstname') . ' ' . $this->request->post['firstname'] . "\n";
$message .= $this->language->get('entry_lastname') . ' ' . $this->request->post['lastname'] . "\n";
$message .= $this->language->get('entry_email') . ' ' . $this->request->post['email'] . "\n";
$message .= $this->language->get('entry_telephone') . ' ' . $this->request->post['telephone'] . "\n";
$message .= $this->language->get('entry_fax') . ' ' . $this->request->post['fax'] . "\n";
$message .= $this->language->get('entry_company') . ' ' . $this->request->post['company'] . "\n";
$message .= $this->language->get('entry_address_1') . ' ' . $this->request->post['address_1'] . "\n";
$message .= $this->language->get('entry_address_2') . ' ' . $this->request->post['address_2'] . "\n";
$message .= $this->language->get('entry_city') . ' ' . $this->request->post['city'] . "\n";
$message .= $this->language->get('entry_zone') . ' ' . $zone['name'] . "\n";
$message .= $this->language->get('entry_postcode') . ' ' . $this->request->post['postcode'] . "\n";
$message .= $this->language->get('entry_country') . ' ' . $country['name'] . "\n";
$message .= ($this->request->post['newsletter']) ? $this->language->get('entry_newsletter') . ' ' . $this->language->get('text_yes') : $this->language->get('entry_newsletter') . ' ' . $this->language->get('text_no');
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->setTo($this->config->get('config_email'));
$mail->send();
Para Idioma Ingles
In catalog/language/english/account/create.php
After:
$_['text_agree'] = 'I have read and agree to the <a class="thickbox" href="index.php?route=information/information/loadInfo&create=1" alt="%s"><b>%s</b></a>';
Add:
$_['text_registration'] = 'New Customer Registration:';
$_['text_new_registration']= 'A new customer just registered at';
Para Idioma Español
In catalog/language/spanish/account/create.php
After:
$_['text_agree'] = 'I have read and agree to the <a class="thickbox" href="index.php?route=information/information/loadInfo&create=1" alt="%s"><b>%s</b></a>';
Add:
$_['text_registration'] = 'Nuevo Registro de Cliente:';
$_['text_new_registration']= 'Un nuevo Cliente se ha Registrado en';
Este es un ejemplo de como llegan los mensajes a mi outlook xpress:
Un Nuevo Cliente se ha Registrado en Discount Optical.
Nombre: minor
Apellidos: bermudez
Correo Electrónico: mbermudez@opticasbermudez.com
Teléfono: 22306011
Fax: 22412033
Empresa: ópticas bermúdez
Dirección 1: 150 este de la BK en tibas
Dirección 2: 350este municipalidad de tibas
Ciudad: tibas
Región / Provincia: San Jose
Código Postal:
País: Costa Rica
Suscribir: Si
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Lo malo que cuando tenga que actualizar a una nueva version de opencart, se borrará todo, no?
gracias.
Asi es, la mayoria de los modulos, temas, modificaciones, etc (por esto no te preocupes que siempre se busca la forma de hacerlos de nuevo o actualizarlos), pero por lo que veo en el foro ingles el 1.5 va para largo y tendido, asi que en mi caso personal me mantendre por un rato con el 1.4.9.3wifi-online wrote:Muchas gracias, funciona correctamente...
Lo malo que cuando tenga que actualizar a una nueva version de opencart, se borrará todo, no?
gracias.
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Gracias.
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Creo que no me he explicado bien, cuando copié el codigo de arriba , en vez de llegar un mail de confirmación, me llegan 2, uno con todos los datos y otro con el aviso de registro, y es este último el que quería eliminar.
Gracias!
Lo que si tienes asegurado es que con el codigo de arriba te llegará el nuevo registro con toda la informacion del cliente y esto que es una modificacion es aparte del sistema, mientras que el registro oficial el que viene con el sistema es el que te puse de que no alerte al admin si se registra un nuevo cliente. Ya probastes esto ultimo?? Solamente es desmarcar el SI, no cambies nada mas, acuerdate de dejar el email de la empresa.iago wrote:Gracias Celestial,
Creo que no me he explicado bien, cuando copié el codigo de arriba , en vez de llegar un mail de confirmación, me llegan 2, uno con todos los datos y otro con el aviso de registro, y es este último el que quería eliminar.
Gracias!
Editado: Por favor avisa si te funciona y otra pregutna, que version estas usando??
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Este es el codigo original
EMAIL AL CLIENTE
$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->request->post['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->setSubject($subject);
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send();
(EN ESTA PARTE DE ACA ES DONDE TE MANDA EL MENSAJE DE QUE UN NUEVO CLIENTE SE HA REGISTRADO, FIJATE EN LOS $mail->send(), entonces desde aca puedes ver que le manda uno al cliente y uno al admin 2 sends, ok y a ti te estan llegando 2 emails, este que esta abajo y el de la modificacion.)
// Send to main admin email if account email is enabled
if ($this->config->get('config_account_mail')) {
$mail->setTo($this->config->get('config_email'));
$mail->send();
}
(Y ESTE de ACA ES POR SI ESTIPULASTES MAS CORREOS U OTRAS PERSONAS, casi nadie lo toma en cuenta)
// Send to additional alert emails if account email is enabled
$emails = explode(',', $this->config->get('config_alert_emails'));
foreach ($emails as $email) {
if (strlen($email) > 0 && preg_match(EMAIL_PATTERN, $email)) {
$mail->setTo($email);
$mail->send();
}
}
HASTA ACA ES EL ORIGINAL------------
LA MODIFICACION DICE DE QUE DESPUES DEL SEND() del CLIENTE (fijate bien en esto) pones todo el codigo de arriba (el de la modificacion y con el vendria otro send(), quiere decir que seguido del codigo de la modificacion habria de probar comentar estas lineas y ver que pasa:
// Send to main admin email if account email is enabled
if ($this->config->get('config_account_mail')) {
$mail->setTo($this->config->get('config_email'));
$mail->send();
}
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
creo que es, si o si, como dice celestial che, tenes que destildar que no queres recibir alertas de nuevos clientes.celestial wrote:Prueba esto: admin\configuracion\correo Marcar NO en Correo de Alerta
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Users browsing this forum: No registered users and 17 guests