Jump to content

New Client Registers and Admin gets an alert in 2 emails


ruisonika

Recommended Posts

Hello everybody,

I'm using prestashop 1.6 and i'm with this issue.
When a new client register in my presta site  i as admin receive 1 email, but i wanna receive the same email in another email too.
I tried in datatable ps_configuration in PS_SHOP_EMAIL add the other email with comma between (doesn't work).
In file AuthController.php (controllers/front/) i have this code
 

protected function sendConfirmationMail(Customer $customer)
    {
        if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL')) {
            return true;
        }
        Mail::Send(
            Configuration::get('PS_LANG_DEFAULT'),
            'account_for_admin',
            Mail::l('New client!'),
            array(
                '{firstname}' => $customer->firstname,
                '{lastname}' => $customer->lastname,
                '{email}' => $customer->email,
                '{company}' => $customer->company,
                '{morada}' => $customer->morada,
                '{telefone}' => $customer->telefone,
                '{cp}' => $customer->cp,
                '{local}' => $customer->local,
                '{local2}' => $customer->local2,
                '{nipc}' => $customer->nipc,
                '{email_geral}' => $customer->email_geral,
                '{local}' => $customer->local,
                '{fax}' => $customer->fax,
                '{gere_dir}' => $customer->gere_dir,
                '{tel_dir}' => $customer->tel_dir,
                '{email_dir}' => $customer->email_dir,
                '{n_func}' => $customer->n_func,
                '{forn1}' => $customer->forn1,
                '{forn2}' => $customer->forn2,
                '{forn3}' => $customer->forn3,
                '{compras}' => $customer->compras,
                '{pais}' => $customer->pais,
                ),
            Configuration::get('PS_SHOP_EMAIL'),
            Configuration::get('PS_SHOP_NAME')
        );
        return Mail::Send(
            $this->context->language->id,
            'account',
            Mail::l('Welcome!'),
            array(
                '{firstname}' => $customer->firstname,
                '{lastname}' => $customer->lastname,
                '{email}' => $customer->email,
                '{passwd}' => str_repeat('*', strlen(Tools::getValue('passwd'))),
            ),
            $customer->email,
            $customer->firstname.' '.$customer->lastname
        );
    }

So i've tried to change hardcoded like this
 

 //Configuration::get('PS_SHOP_EMAIL'),
'[email protected]',
'[email protected]',
 Configuration::get('PS_SHOP_NAME')

And it doesn't work ...
All the help it would be appreciated :)

Thanks

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...