Hello,
Unfortunately, this does not work from 1.6.1.20:
/*
if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars,
$customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null,
_PS_MAIL_DIR_, true, (int)$order->id_shop))
{
*/
Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order, 'customer' => $customer, 'carrier' => $carrier), null, false, true, false, $order->id_shop);
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
/*
}
else
$this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.');
*/
It's blank page in orders:
Parse error: syntax error, unexpected 'else' (T_ELSE) in controllers/admin/AdminOrdersController.php on line 505
Problem solved:
/*
if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang),$templateVars,
$customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null,
_PS_MAIL_DIR_, true, (int)$order->id_shop))
*/
{
Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order, 'customer' => $customer, 'carrier' => $carrier), null, false, true, false, $order->id_shop);
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
/*
} else {
$this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.');
*/
This is correct code, attention to the brackets!