From ff44291d3812e6fb7da9490a034e33fe2e2aa6bd Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 26 Jan 2012 15:17:23 +0000 Subject: [PATCH] [-] FO : uncombinable cart rules are not combinable anymore git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12721 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 2 +- classes/CartRule.php | 2 +- controllers/front/ParentOrderController.php | 2 +- themes/default/css/global.css | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index b75390c09..6dba7c69c 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -693,7 +693,7 @@ class CartCore extends ObjectModel public function addCartRule($id_cart_rule) { // You can't add a cart rule that does not exist - $cartRule = new CartRule($id_cart_rule, Context::getContext()->lang->id); + $cartRule = new CartRule($id_cart_rule, Context::getContext()->language->id); if (!Validate::isLoadedObject($cartRule)) return false; diff --git a/classes/CartRule.php b/classes/CartRule.php index b7a947e4a..766cff237 100644 --- a/classes/CartRule.php +++ b/classes/CartRule.php @@ -294,7 +294,7 @@ class CartRuleCore extends ObjectModel { if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart) return Tools::displayError('This voucher is already in your cart'); - if ($this->carrier_restriction && $otherCartRule['cart_rule_restriction']) + if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction']) { $combinable = Db::getInstance()->getValue(' SELECT id_cart_rule_1 diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index b0d4692f3..a850feef3 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -116,7 +116,7 @@ class ParentOrderControllerCore extends FrontController 'discount_name' => Tools::safeOutput($code) )); } - elseif ($id_cart_rule = (int)Tools::getValue('deleteDiscount') && Validate::isUnsignedId($id_cart_rule)) + elseif (($id_cart_rule = (int)Tools::getValue('deleteDiscount')) && Validate::isUnsignedId($id_cart_rule)) { $this->context->cart->removeCartRule($id_cart_rule); Tools::redirect('index.php?controller=order-opc'); diff --git a/themes/default/css/global.css b/themes/default/css/global.css index b91b83794..45e48c223 100644 --- a/themes/default/css/global.css +++ b/themes/default/css/global.css @@ -660,7 +660,6 @@ table#cart_summary td { table#cart_summary td.cart_delete, table#cart_summary td.price_discount_del {border-right:none} table#cart_summary .last_item td {border-bottom:1px solid #999} -table#cart_summary td.cart_discount_price {border-bottom:1px solid #999} table#cart_summary tr:nth-child(odd),