This commit is contained in:
paoloar77
2024-07-11 15:29:48 +02:00
parent 5c2db90c21
commit fd0ebfe54e

View File

@@ -2189,7 +2189,7 @@ function updateCreate($request) {
}
$changedest = false;
if (($request->shipping['address_1'] != null && $request->shipping['address_1'] != '' && $request->shipping['address_1'] != $request->billing['address_1']) || ($request->shipping['first_name'] != null && $request->shipping['first_name'] != '' && $request->shipping['first_name'] != $request->billing['first_name'])) {
if (($request->shipping->address_1 != null && $request->shipping->address_1 != '' && $request->shipping->address_1 != $request->billing->address_1) || ($request->shipping->first_name != null && $request->shipping->first_name != '' && $request->shipping->first_name != $request->billing->first_name)) {
$changedest = true;
}
//$orderold =
@@ -2257,8 +2257,8 @@ function updateCreate($request) {
} else {
$customer = $request;
$customer['id'] = 0;
$customer['last_name'] = $request->billing['last_name'];
$customer['first_name'] = $request->billing['first_name'];
$customer['last_name'] = $request->billing->last_name;
$customer['first_name'] = $request->billing->first_name;
$customer['billing'] = $request->billing;
$customer['meta_data'] = $request->meta_data;
}
@@ -2308,13 +2308,13 @@ function updateCreate($request) {
$productLogger->addLog('', 'Change Destinazione:');
$clientedest = new Clientegmdest();
$clientedest->CodDestInternet = $request->customer_id;
$clientedest->Nominativo = $request->shipping['last_name'] ?? '';
$clientedest->Indirizzo = $request->shipping['address_1'] ?? '';
$clientedest->Indirizzo .= $request->shipping['address_2'] ?? '';
$clientedest->Citta = $request->shipping['city'] ?? '';
$clientedest->Cap = $request->shipping['postcode'] ?? '';
$clientedest->Provincia = $request->shipping['state'] ?? '';
$clientedest->Telefono = $request->shipping['phone'] ?? '';
$clientedest->Nominativo = $request->shipping->last_name ?? '';
$clientedest->Indirizzo = $request->shipping->address_1 ?? '';
$clientedest->Indirizzo .= $request->shipping->address_2 ?? '';
$clientedest->Citta = $request->shipping->city ?? '';
$clientedest->Cap = $request->shipping->postcode ?? '';
$clientedest->Provincia = $request->shipping->state ?? '';
$clientedest->Telefono = $request->shipping->phone ?? '';
$clientedest->IdNazione = 227;
$clientedest->IdInternet = $request->id;
$clientedest->save();