From e64b14b29240a72594adf9e53404ac409c510382 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Thu, 3 May 2012 12:26:21 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-2120 - no product listed in product return form git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15037 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/OrderFollowController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/front/OrderFollowController.php b/controllers/front/OrderFollowController.php index 96c5d6740..34db16c01 100644 --- a/controllers/front/OrderFollowController.php +++ b/controllers/front/OrderFollowController.php @@ -46,9 +46,9 @@ class OrderFollowControllerCore extends FrontController Tools::redirect('index.php?controller=history'); if (!$order_qte_input = Tools::getValue('order_qte_input')) Tools::redirect('index.php?controller=order-follow&errorDetail1'); - if ($customizationIds = Tools::getValue('customization_ids') && !$customizationQtyInput) + if (!$customizationQtyInput && $customizationIds = Tools::getValue('customization_ids')) Tools::redirect('index.php?controller=order-follow&errorDetail1'); - if (!$ids_order_detail = Tools::getValue('ids_order_detail') && !$customizationIds) + if (!$customizationIds && !$ids_order_detail = Tools::getValue('ids_order_detail')) Tools::redirect('index.php?controller=order-follow&errorDetail2'); $order = new Order((int)($id_order)); @@ -61,6 +61,7 @@ class OrderFollowControllerCore extends FrontController $orderReturn->question = strval(Tools::getValue('returnText')); if (empty($orderReturn->question)) Tools::redirect('index.php?controller=order-follow&errorMsg'); + if (!$orderReturn->checkEnoughProduct($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput)) Tools::redirect('index.php?controller=order-follow&errorQuantity');