[-] FO : Fix bug #PSCFI-6864 #PSCFV-6516 Issue with deleted address blocking order process
This commit is contained in:
+1
-1
@@ -2837,8 +2837,8 @@ class CartCore extends ObjectModel
|
||||
$invoice = new Address((int)$this->id_address_invoice);
|
||||
|
||||
// New layout system with personalization fields
|
||||
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
||||
$formatted_addresses['invoice'] = AddressFormat::getFormattedLayoutData($invoice);
|
||||
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
||||
|
||||
$total_tax = $this->getOrderTotal() - $this->getOrderTotal(false);
|
||||
|
||||
|
||||
@@ -412,16 +412,17 @@ class CustomerCore extends ObjectModel
|
||||
*/
|
||||
public static function customerHasAddress($id_customer, $id_address)
|
||||
{
|
||||
if (!array_key_exists($id_customer, self::$_customerHasAddress))
|
||||
$key = (int)$id_customer.'-'.(int)$id_address;
|
||||
if (!array_key_exists($id_address, self::$_customerHasAddress))
|
||||
{
|
||||
self::$_customerHasAddress[$id_customer] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
self::$_customerHasAddress[$key] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT `id_address`
|
||||
FROM `'._DB_PREFIX_.'address`
|
||||
WHERE `id_customer` = '.(int)$id_customer.'
|
||||
AND `id_address` = '.(int)$id_address.'
|
||||
AND `deleted` = 0');
|
||||
}
|
||||
return self::$_customerHasAddress[$id_customer];
|
||||
return self::$_customerHasAddress[$key];
|
||||
}
|
||||
|
||||
public static function resetAddressCache($id_customer)
|
||||
|
||||
Reference in New Issue
Block a user