Post by wifi-online » Thu Jan 20, 2011 4:18 am

HOla, hay algún modulo para que el administrador de la tienda sepa cuando se registra un cliente.
Es decir, que el admin,reciba un correo para saber que alguien se ha registrado y aprobar al cliente?
Gracias.

New member

Posts

Joined
Wed Oct 20, 2010 8:49 am
Location - Spain

Post by celestial » Thu Jan 20, 2011 6:15 am

For multi-languages

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


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by wifi-online » Thu Jan 20, 2011 6:33 am

Muchas gracias, funciona correctamente...
Lo malo que cuando tenga que actualizar a una nueva version de opencart, se borrará todo, no?
gracias.

New member

Posts

Joined
Wed Oct 20, 2010 8:49 am
Location - Spain

Post by celestial » Thu Jan 20, 2011 6:41 am

wifi-online wrote:Muchas gracias, funciona correctamente...
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.3

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by wifi-online » Thu Jan 20, 2011 6:44 am

muchas gracias, de nuevo... ya expondré mas dudas, que las tengo jajaj!
Saludos.

New member

Posts

Joined
Wed Oct 20, 2010 8:49 am
Location - Spain

Post by iago » Wed Jun 01, 2011 4:07 pm

Hola, una preguntilla, lo he probado y funciona perfectamente, pero ahora el sistema me envía 2 mails .Uno de alta y otro con los datos del cliente.Que parte tengo que borrar para que no me envíe la notificación del alta y me envíe solo el mail con los datos del cliente?

Gracias.

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by celestial » Wed Jun 01, 2011 11:03 pm

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


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by iago » Wed Jun 01, 2011 11:39 pm

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!

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by celestial » Thu Jun 02, 2011 12:46 am

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!
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.

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


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by iago » Thu Jun 02, 2011 1:34 am

Es lo que te comentaba, cuando desmarque el si, deje de recibir correos cuando se registraba alguien.

La version es la 1.4.9.5

Gracias.

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by celestial » Thu Jun 02, 2011 1:48 am

Que raro dejame revisar esa version, ya que me salte a la 1.5

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by celestial » Thu Jun 02, 2011 2:06 am

Fijate en esto y es solo para que entiendas la logica del email:

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


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by cofran » Fri Jun 03, 2011 12:29 am

celestial wrote:Prueba esto: admin\configuracion\correo Marcar NO en Correo de Alerta
creo que es, si o si, como dice celestial che, tenes que destildar que no queres recibir alertas de nuevos clientes.

User avatar
Active Member

Posts

Joined
Thu Oct 01, 2009 7:37 am
Location - Córdoba, Argentina

Post by iago » Fri Jun 03, 2011 6:31 pm

Ahora ya recibo el mail personalizado, el caso es que me lo envía duplicado, tengo que quitar un send() pero no se cual ;D

Saludos

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by cofran » Fri Jun 03, 2011 11:35 pm

duplicado significa dos veces el mismo?...

User avatar
Active Member

Posts

Joined
Thu Oct 01, 2009 7:37 am
Location - Córdoba, Argentina

Post by iago » Sat Jun 04, 2011 1:11 am

Sip.

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by celestial » Sat Jun 04, 2011 2:29 am

Estoy casi 100% seguro de que no recibes el mismo contenido en los 2 email, el oficial de OC el mensaje es corto y el de la modificacion contiene mas informacion, no hay manera alguna.

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by iago » Sat Jun 04, 2011 7:53 pm

Perdón, no se porque pensaba que me llegaban 2 mails pero desde la ultima modificación me llega solo uno y funciona perfectamente.

Muchas gracias a todos

New member

Posts

Joined
Fri May 27, 2011 8:21 pm

Post by buscador » Tue May 13, 2014 6:55 am

Hola iago, ¿me podrías decir cuál fue la última modificación que hiciste? yo tengo el mismo problema y no sé como solucionarlo.
Gracias.

Newbie

Posts

Joined
Tue May 13, 2014 6:54 am
Who is online

Users browsing this forum: No registered users and 14 guests