// Fixed revision 13573
This commit is contained in:
@@ -215,11 +215,11 @@ class AdminWarehousesControllerCore extends AdminController
|
|||||||
'label' => $this->l('Country:'),
|
'label' => $this->l('Country:'),
|
||||||
'name' => 'id_country',
|
'name' => 'id_country',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'default_value' => (int)$this->context->country->id,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'query' => Country::getCountries($this->context->language->id, false),
|
'query' => Country::getCountries($this->context->language->id, false),
|
||||||
'id' => 'id_country',
|
'id' => 'id_country',
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'preselect_country' => true,
|
|
||||||
),
|
),
|
||||||
'desc' => $this->l('Country where the state, region or city is located')
|
'desc' => $this->l('Country where the state, region or city is located')
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
$delivery_option = $this->context->cart->getDeliveryOption();
|
$delivery_option = $this->context->cart->getDeliveryOption();
|
||||||
$delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option');
|
$delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option');
|
||||||
$this->context->cart->setDeliveryOption($delivery_option);
|
$this->context->cart->setDeliveryOption($delivery_option);
|
||||||
|
$this->context->cart->save();
|
||||||
$return = array(
|
$return = array(
|
||||||
'content' => Hook::exec(
|
'content' => Hook::exec(
|
||||||
'displayCarrierList',
|
'displayCarrierList',
|
||||||
@@ -108,7 +109,7 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
);
|
);
|
||||||
die(Tools::jsonEncode($return));
|
die(Tools::jsonEncode($return));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->nbProducts)
|
if ($this->nbProducts)
|
||||||
$this->context->smarty->assign('virtual_cart', $isVirtualCart);
|
$this->context->smarty->assign('virtual_cart', $isVirtualCart);
|
||||||
|
|
||||||
@@ -141,11 +142,18 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
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');
|
$cgv = Tools::getValue('cgv');
|
||||||
if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false))
|
if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false))
|
||||||
Tools::redirect('index.php?controller=order&step=2');
|
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();
|
$this->autoStep();
|
||||||
|
|
||||||
// Bypass payment step if total is 0
|
// 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))
|
if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice))
|
||||||
Tools::redirect('index.php?controller=order&step=1');
|
Tools::redirect('index.php?controller=order&step=1');
|
||||||
|
|
||||||
if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0)
|
if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0)
|
||||||
Tools::redirect('index.php?controller=order&step=2');
|
Tools::redirect('index.php?controller=order&step=2');
|
||||||
|
|
||||||
$delivery = new Address((int)$this->context->cart->id_address_delivery);
|
$delivery = new Address((int)$this->context->cart->id_address_delivery);
|
||||||
$invoice = new Address((int)$this->context->cart->id_address_invoice);
|
$invoice = new Address((int)$this->context->cart->id_address_invoice);
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,4 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('_PS_INSTALL_VERSION_', '1.5.0.6');
|
define('_PS_INSTALL_VERSION_', '1.5.0.7');
|
||||||
|
|||||||
Reference in New Issue
Block a user