// Fix backOffice order cart rules management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14201 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -388,9 +388,9 @@ class AdminCartsControllerCore extends AdminController
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
{
|
||||
$errors = array();
|
||||
if (!$id_cart_rule = Tools::getValue('id_cart_rule') || !$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))
|
||||
elseif ($err = $cart_rule->checkValidity($this->context))
|
||||
$errors[] = $err;
|
||||
if (!count($errors))
|
||||
if (!$this->context->cart->addCartRule((int)$cart_rule->id))
|
||||
|
||||
Reference in New Issue
Block a user