Merge branch 'develop' into gli-2229

This commit is contained in:
vishalsingh.qlo325
2024-08-23 09:46:32 +05:30
142 changed files with 4022 additions and 4066 deletions

View File

@@ -365,13 +365,13 @@ class FrontControllerCore extends Controller
$cart->update();
}
/* Select an address if not set */
if (isset($cart) && (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0 ||
!isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) && $this->context->cookie->id_customer) {
if (isset($cart)
&& (!isset($cart->id_address_invoice)
|| $cart->id_address_invoice == 0
)
&& $this->context->cookie->id_customer
) {
$to_update = false;
if (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0) {
$to_update = true;
$cart->id_address_delivery = (int)Address::getFirstCustomerAddressId($cart->id_customer);
}
if (!isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) {
$to_update = true;
$cart->id_address_invoice = (int)Address::getFirstCustomerAddressId($cart->id_customer);
@@ -391,8 +391,7 @@ class FrontControllerCore extends Controller
$cart->id_shop = $this->context->shop->id;
if ($this->context->cookie->id_customer) {
$cart->id_customer = (int)$this->context->cookie->id_customer;
$cart->id_address_delivery = (int)Address::getFirstCustomerAddressId($cart->id_customer);
$cart->id_address_invoice = (int)$cart->id_address_delivery;
$cart->id_address_invoice = (int)Address::getFirstCustomerAddressId($cart->id_customer);
} else {
$cart->id_address_delivery = 0;
$cart->id_address_invoice = 0;