// Fix Bug with 5-step and carriers not selected

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13534 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-22 15:23:19 +00:00
parent 25f7a4c817
commit 3f894e4c1c
4 changed files with 44 additions and 9 deletions
+9 -1
View File
@@ -98,6 +98,7 @@ class OrderControllerCore extends ParentOrderController
$delivery_option = $this->context->cart->getDeliveryOption();
$delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option');
$this->context->cart->setDeliveryOption($delivery_option);
$this->context->cart->save();
$return = array(
'content' => Hook::exec(
'displayCarrierList',
@@ -141,11 +142,18 @@ class OrderControllerCore extends ParentOrderController
break;
case 3:
// Test that the conditions (so active) were accepted by the customer
// Check that the conditions (so active) were accepted by the customer
$cgv = Tools::getValue('cgv');
if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false))
Tools::redirect('index.php?controller=order&step=2');
// Check the delivery option is setted
if (!Tools::getValue('delivery_option'))
Tools::redirect('index.php?controller=order&step=2');
foreach (Tools::getValue('delivery_option') as $delivery_option)
if (empty($delivery_option))
Tools::redirect('index.php?controller=order&step=2');
$this->autoStep();
// Bypass payment step if total is 0