From 691932f2bddb107efbd6da74d6b5312ca9f1f52b Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 27 Dec 2012 17:44:24 +0100 Subject: [PATCH] [-] FO : vouchers created in the backend order creation are not displayed in the frontend anymore --- controllers/front/ParentOrderController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 9cf6a2d47..14a20fe35 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -328,9 +328,19 @@ class ParentOrderControllerCore extends FrontController $available_cart_rules = CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0), true, true, true, $this->context->cart); $cart_cart_rules = $this->context->cart->getCartRules(); foreach ($available_cart_rules as $key => $available_cart_rule) + { + if (strpos($available_cart_rule['code'], 'BO_ORDER_') === 0) + { + unset($available_cart_rules[$key]); + continue; + } foreach ($cart_cart_rules as $cart_cart_rule) if ($available_cart_rule['id_cart_rule'] == $cart_cart_rule['id_cart_rule']) + { unset($available_cart_rules[$key]); + continue 2; + } + } $show_option_allow_separate_package = (!$this->context->cart->isAllProductsInStock(true) && Configuration::get('PS_SHIP_WHEN_AVAILABLE'));