Jump to content

Send Welcome email to client after (manual) account creation in BO


Recommended Posts

Dear friends,

 

In prevoius versions of prestashop, i used the "hack" bellow to have Welcome email send to customers, if the customer account is created from backoffice. Is not about to send an email about activation, is about the welcome email (with the account login details).

The hack is ( in AdminCustomers.php - near 166 line)

/ Default behavior (save and back)
Tools::redirectAdmin($currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$this->token);

Add this two lines:

if (!Mail::Send((int)(2), 'account', Mail::l('Welcome!'),
array('{firstname}' => Tools::getValue('firstname'), '{lastname}' => Tools::getValue('lastname'), '{email}' => Tools::getValue('email'), '{passwd}' => Tools::getValue('passwd')), Tools::getValue('email'), Tools::getValue('firstname').' '.Tools::getValue('lastname')))

$this->errors[] = Tools::displayError('Cannot send email');

Now in prestashop 1.6.0.8, i cant get it to work. I will be forever grateful if someone point me in the right direction to have this option working again, because is important for me. Can be "hack" or module.

 

With anticipated thanks

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

Hi @hhhans1, i'm having the same situation. Have you solved your issue ?

 

thanks.

 

Dear friends,

 

In prevoius versions of prestashop, i used the "hack" bellow to have Welcome email send to customers, if the customer account is created from backoffice. Is not about to send an email about activation, is about the welcome email (with the account login details).

The hack is ( in AdminCustomers.php - near 166 line)

/ Default behavior (save and back)
Tools::redirectAdmin($currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$this->token);

Add this two lines:

if (!Mail::Send((int)(2), 'account', Mail::l('Welcome!'),
array('{firstname}' => Tools::getValue('firstname'), '{lastname}' => Tools::getValue('lastname'), '{email}' => Tools::getValue('email'), '{passwd}' => Tools::getValue('passwd')), Tools::getValue('email'), Tools::getValue('firstname').' '.Tools::getValue('lastname')))

$this->errors[] = Tools::displayError('Cannot send email');

Now in prestashop 1.6.0.8, i cant get it to work. I will be forever grateful if someone point me in the right direction to have this option working again, because is important for me. Can be "hack" or module.

 

With anticipated thanks

Link to comment
Share on other sites

×
×
  • Create New...