[-] FO: Fix #PSCFV-4370
This commit is contained in:
@@ -188,7 +188,10 @@ class FrontControllerCore extends Controller
|
|||||||
{
|
{
|
||||||
$cart = new Cart($this->context->cookie->id_cart);
|
$cart = new Cart($this->context->cookie->id_cart);
|
||||||
if ($cart->OrderExists())
|
if ($cart->OrderExists())
|
||||||
|
{
|
||||||
unset($this->context->cookie->id_cart, $cart, $this->context->cookie->checkedTOS);
|
unset($this->context->cookie->id_cart, $cart, $this->context->cookie->checkedTOS);
|
||||||
|
$this->context->cookie->check_cgv = false;
|
||||||
|
}
|
||||||
/* Delete product of cart, if user can't make an order from his country */
|
/* Delete product of cart, if user can't make an order from his country */
|
||||||
elseif (intval(Configuration::get('PS_GEOLOCATION_ENABLED')) &&
|
elseif (intval(Configuration::get('PS_GEOLOCATION_ENABLED')) &&
|
||||||
!in_array(strtoupper($this->context->cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) &&
|
!in_array(strtoupper($this->context->cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) &&
|
||||||
|
|||||||
@@ -147,20 +147,21 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
// Check 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') || $this->context->cookie->check_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');
|
||||||
|
Context::getContext()->cookie->check_cgv = true;
|
||||||
|
|
||||||
// Check the delivery option is setted
|
// Check the delivery option is setted
|
||||||
if (!$this->context->cart->isVirtualCart())
|
if (!$this->context->cart->isVirtualCart())
|
||||||
{
|
{
|
||||||
if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier'))
|
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');
|
Tools::redirect('index.php?controller=order&step=2');
|
||||||
elseif (!Tools::getValue('id_carrier'))
|
elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier)
|
||||||
{
|
{
|
||||||
foreach (Tools::getValue('delivery_option') as $delivery_option)
|
foreach (Tools::getValue('delivery_option') as $delivery_option)
|
||||||
if (empty($delivery_option))
|
if (empty($delivery_option))
|
||||||
Tools::redirect('index.php?controller=order&step=2');
|
Tools::redirect('index.php?controller=order&step=2');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user