// Fixed revision 13573

This commit is contained in:
bMancone
2012-02-28 13:26:55 +00:00
parent 7bae1b2bf5
commit 8ed87c5572
3 changed files with 14 additions and 6 deletions

View File

@@ -215,11 +215,11 @@ class AdminWarehousesControllerCore extends AdminController
'label' => $this->l('Country:'),
'name' => 'id_country',
'required' => true,
'default_value' => (int)$this->context->country->id,
'options' => array(
'query' => Country::getCountries($this->context->language->id, false),
'id' => 'id_country',
'name' => 'name',
'preselect_country' => true,
),
'desc' => $this->l('Country where the state, region or city is located')
),

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',
@@ -108,7 +109,7 @@ class OrderControllerCore extends ParentOrderController
);
die(Tools::jsonEncode($return));
}
if ($this->nbProducts)
$this->context->smarty->assign('virtual_cart', $isVirtualCart);
@@ -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
@@ -203,10 +211,10 @@ class OrderControllerCore extends ParentOrderController
if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice))
Tools::redirect('index.php?controller=order&step=1');
if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0)
Tools::redirect('index.php?controller=order&step=2');
$delivery = new Address((int)$this->context->cart->id_address_delivery);
$invoice = new Address((int)$this->context->cart->id_address_invoice);

View File

@@ -25,4 +25,4 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_INSTALL_VERSION_', '1.5.0.6');
define('_PS_INSTALL_VERSION_', '1.5.0.7');