From 312e16a9266b63c497ff8321133fe57e3b979d93 Mon Sep 17 00:00:00 2001 From: Vincent Schoener Date: Thu, 28 Mar 2013 12:45:03 +0100 Subject: [PATCH] [-] CORE : Fix issue with delivery option Happens after a payment redirection error, delivery_option is not sent (but should be set in the cart context) --- controllers/front/OrderController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php index 190bdd1de..cc406e733 100644 --- a/controllers/front/OrderController.php +++ b/controllers/front/OrderController.php @@ -155,14 +155,18 @@ class OrderControllerCore extends ParentOrderController Tools::redirect('index.php?controller=order&step=2'); Context::getContext()->cookie->check_cgv = true; - // Check the delivery option is setted + // Check the delivery option is set if (!$this->context->cart->isVirtualCart()) { if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier) Tools::redirect('index.php?controller=order&step=2'); elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier) { - foreach (Tools::getValue('delivery_option') as $delivery_option) + $deliveries_options = Tools::getValue('delivery_option'); + if (!$deliveries_options) { + $deliveries_options = $this->context->cart->delivery_option; + } + foreach ($deliveries_options as $delivery_option) if (empty($delivery_option)) Tools::redirect('index.php?controller=order&step=2'); }