// clean code
This commit is contained in:
@@ -931,9 +931,11 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$customer = new Customer((int)$cart->id_customer);
|
$customer = new Customer((int)$cart->id_customer);
|
||||||
if (Validate::isLoadedObject($customer))
|
if (Validate::isLoadedObject($customer))
|
||||||
{
|
{
|
||||||
$mailVars = array('{order_link}' => Context::getContext()->link->getPageLink('order', false, (int)$cart->id_lang, 'step=3&recover_cart='.(int)$cart->id.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.(int)$cart->id)),
|
$mailVars = array(
|
||||||
'{firstname}' => $customer->firstname,
|
'{order_link}' => Context::getContext()->link->getPageLink('order', false, (int)$cart->id_lang, 'step=3&recover_cart='.(int)$cart->id.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.(int)$cart->id)),
|
||||||
'{lastname}' => $customer->lastname,);
|
'{firstname}' => $customer->firstname,
|
||||||
|
'{lastname}' => $customer->lastname
|
||||||
|
);
|
||||||
if (Mail::Send((int)$cart->id_lang, 'backoffice_order', Mail::l('Process the payment of your order', (int)$cart->id_lang), $mailVars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL,_PS_MAIL_DIR_, true))
|
if (Mail::Send((int)$cart->id_lang, 'backoffice_order', Mail::l('Process the payment of your order', (int)$cart->id_lang), $mailVars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL,_PS_MAIL_DIR_, true))
|
||||||
die(Tools::jsonEncode(array('errors' => false, 'result' => $this->l('The mail was sent to your customer.'))));
|
die(Tools::jsonEncode(array('errors' => false, 'result' => $this->l('The mail was sent to your customer.'))));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user