prevent mails from being sent when customers are created during the erp synchro in PREPROD
This commit is contained in:
parent
b1ec03723e
commit
d318c73293
@ -183,20 +183,22 @@ foreach ($ids_customer as $id_customer) {
|
||||
$target_emails[] = $representant_email;
|
||||
}
|
||||
|
||||
$mail = Mail::Send(
|
||||
1,
|
||||
'account',
|
||||
Mail::l('Welcome!'),
|
||||
array(
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{email}' => $customer->email,
|
||||
'{passwd}' => $password_generate
|
||||
),
|
||||
$target_emails,
|
||||
$customer->firstname.' '.$customer->lastname
|
||||
);
|
||||
|
||||
if (!defined('ERP_PREPROD') || !ERP_PREPROD) {
|
||||
$mail = Mail::Send(
|
||||
1,
|
||||
'account',
|
||||
Mail::l('Welcome!'),
|
||||
array(
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{email}' => $customer->email,
|
||||
'{passwd}' => $password_generate
|
||||
),
|
||||
$target_emails,
|
||||
$customer->firstname.' '.$customer->lastname
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($other_addresses as $key => $other_address) {
|
||||
//$other_address['phone'] = ($other_address['phone']) ? $other_address['phone'] : $record['phone'];
|
||||
if (isset($other_address['phone']) && !empty($other_address['phone'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user