// Normalize

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12691 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-25 16:39:34 +00:00
parent b2e21e6ce1
commit 359b51d1ea
14 changed files with 61 additions and 64 deletions
+2 -4
View File
@@ -245,7 +245,7 @@ class AdminCartsControllerCore extends AdminController
return;
if ($this->context->cart->OrderExists())
$errors[] = Tools::displayError('An order already placed with this cart');
elseif (!($id_product = (int)Tools::getValue('id_product')) OR !($product = new Product((int)$id_product, true, $this->context->language->id)))
elseif (!($id_product = (int)Tools::getValue('id_product')) || !($product = new Product((int)$id_product, true, $this->context->language->id)))
$errors[] = Tools::displayError('Invalid product');
elseif (!($qty = Tools::getValue('qty')) || $qty == 0)
$errors[] = Tools::displayError('Invalid quantity');
@@ -355,9 +355,7 @@ class AdminCartsControllerCore extends AdminController
if ($this->tabAccess['edit'] === '1')
{
$errors = array();
$customer = new Customer((int)$this->context->cart->id_customer);
if (!$id_cart_rule = Tools::getValue('id_cart_rule') OR !$cart_rule = new CartRule((int)$id_cart_rule))
if (!$id_cart_rule = Tools::getValue('id_cart_rule') || !$cart_rule = new CartRule((int)$id_cart_rule))
$errors[] = Tools::displayError('Invalid voucher');
else if ($err = $cart_rule->checkValidity($this->context))
$errors[] = $err;