// die2exception

This commit is contained in:
mMarinetti
2012-02-17 15:49:27 +00:00
parent cf253f2e8a
commit 5e3ff7eacd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -291,7 +291,7 @@ class OrderCore extends ObjectModel
if ($this->hasBeenDelivered())
{
if (!Configuration::get('PS_ORDER_RETURN'))
die(Tools::displayError());
throw new PrestaShopException('PS_ORDER_RETURN is not defined in table configuration');
$orderDetail->product_quantity_return += (int)($quantity);
return $orderDetail->update();
}
@@ -1120,7 +1120,7 @@ class OrderCore extends ObjectModel
$order = new Order($id_order);
$orderState = $order->getCurrentOrderState();
if (!Validate::isLoadedObject($orderState) || !Validate::isLoadedObject($order))
die(Tools::displayError('Invalid objects'));
throw new PrestaShopException(sprintf('unable to load order id %s and/or its state', $id_order));
echo '<span style="width:20px; margin-right:5px;">';
if (($orderState->invoice && $order->invoice_number) && (int)($tr['product_number']))
echo '<a target="_blank" href="pdf.php?id_order='.(int)$order->id.'&pdf"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>';
+1 -1
View File
@@ -165,7 +165,7 @@ class AdminOrdersControllerCore extends AdminController
$order = new Order($id_order);
$order_state = $order->getCurrentOrderState();
if (!Validate::isLoadedObject($order_state) || !Validate::isLoadedObject($order))
die(Tools::displayError('Invalid objects'));
throw new PrestaShopException(sprintf('unable to load order id %s and/or its state', $id_order));
$this->context->smarty->assign(array(
'order' => $order,