Файл:
/адм.дир/tabs/AdminOrders.php
Код:
if ($history->addWithemail(true, $templateVars))
Tools::redirectAdmin($currentIndex.'&id_order='.$id_order.'&vieworder'.'&token='.$this->token);
$this->_errors[] = Tools::displayError('An error occurred while changing the status or was unable to send e-mail to the customer.');
заменить на:
Код:
if ($history->addWithemail(true, $templateVars))
{
if(isset($newOrderStatusId) && $newOrderStatusId == 7)
{
$products = $order->getProducts();
foreach ($products as $k => $product)
{
$_POST['cancelQuantity'][$k] = $product['product_quantity'];
$_POST['id_order_detail'][$k] = $k;
}
$_POST['cancelProduct'] = 1;
}
}
Код:
elseif (Tools::isSubmit('cancelProduct') && Validate::isLoadedObject($order = new Order((int)Tools::getValue('id_order'))))
заменить на:
Код:
if (Tools::isSubmit('cancelProduct') && Validate::isLoadedObject($order = new Order((int)Tools::getValue('id_order'))))