[-] FO : Check for cart rules before diplaying shopping cart in OPC
This commit is contained in:
@@ -298,15 +298,15 @@ class AuthControllerCore extends FrontController
|
||||
$this->context->cart = new Cart($id_cart);
|
||||
else
|
||||
{
|
||||
$this->context->cart->id_carrier = 0;
|
||||
$this->context->cart->id_carrier = 0;
|
||||
$this->context->cart->setDeliveryOption(null);
|
||||
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||
}
|
||||
$this->context->cart->id_customer = (int)$customer->id;
|
||||
$this->context->cart->id_customer = (int)$customer->id;
|
||||
$this->context->cart->secure_key = $customer->secure_key;
|
||||
$this->context->cart->save();
|
||||
$this->context->cookie->id_cart = (int)$this->context->cart->id;
|
||||
$this->context->cart->save();
|
||||
$this->context->cookie->id_cart = (int)$this->context->cart->id;
|
||||
$this->context->cookie->update();
|
||||
$this->context->cart->autosetProductAddress();
|
||||
|
||||
@@ -396,7 +396,7 @@ class AuthControllerCore extends FrontController
|
||||
$error_phone = true;
|
||||
elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE') && Tools::getValue('email_create')))
|
||||
&& (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')))
|
||||
$error_phone = true;
|
||||
$error_phone = true;
|
||||
}
|
||||
|
||||
if ($error_phone)
|
||||
@@ -598,7 +598,7 @@ class AuthControllerCore extends FrontController
|
||||
Tools::redirect('index.php?controller=address');
|
||||
|
||||
if ($back = Tools::getValue('back'))
|
||||
Tools::redirect(html_entity_decode($back));
|
||||
Tools::redirect(html_entity_decode($back));
|
||||
|
||||
// redirection: if cart is not empty : redirection to the cart
|
||||
if (count($this->context->cart->getProducts(true)) > 0)
|
||||
|
||||
Reference in New Issue
Block a user