mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 13:16:07 +03:00
commit
e429fb9915
@ -29,10 +29,13 @@ class ModelRetailcrmOrder extends Model {
|
|||||||
$order['externalId'] = $order_data['order_id'];
|
$order['externalId'] = $order_data['order_id'];
|
||||||
$order['firstName'] = $order_data['firstname'];
|
$order['firstName'] = $order_data['firstname'];
|
||||||
$order['lastName'] = $order_data['lastname'];
|
$order['lastName'] = $order_data['lastname'];
|
||||||
$order['email'] = $order_data['email'];
|
|
||||||
$order['phone'] = $order_data['telephone'];
|
$order['phone'] = $order_data['telephone'];
|
||||||
$order['customerComment'] = $order_data['comment'];
|
$order['customerComment'] = $order_data['comment'];
|
||||||
|
|
||||||
|
if(!empty($order_data['email'])) {
|
||||||
|
$order['email'] = $order_data['email'];
|
||||||
|
}
|
||||||
|
|
||||||
$order['customer']['externalId'] = $order_data['customer_id'];
|
$order['customer']['externalId'] = $order_data['customer_id'];
|
||||||
|
|
||||||
$deliveryCost = 0;
|
$deliveryCost = 0;
|
||||||
|
@ -42,10 +42,13 @@ class ModelRetailcrmOrder extends Model {
|
|||||||
$order['externalId'] = $order_id;
|
$order['externalId'] = $order_id;
|
||||||
$order['firstName'] = $order_data['firstname'];
|
$order['firstName'] = $order_data['firstname'];
|
||||||
$order['lastName'] = $order_data['lastname'];
|
$order['lastName'] = $order_data['lastname'];
|
||||||
$order['email'] = $order_data['email'];
|
|
||||||
$order['phone'] = $order_data['telephone'];
|
$order['phone'] = $order_data['telephone'];
|
||||||
$order['customerComment'] = $order_data['comment'];
|
$order['customerComment'] = $order_data['comment'];
|
||||||
|
|
||||||
|
if(!empty($order_data['email'])) {
|
||||||
|
$order['email'] = $order_data['email'];
|
||||||
|
}
|
||||||
|
|
||||||
$deliveryCost = 0;
|
$deliveryCost = 0;
|
||||||
$altTotals = isset($order_data['order_total']) ? $order_data['order_total'] : "";
|
$altTotals = isset($order_data['order_total']) ? $order_data['order_total'] : "";
|
||||||
$orderTotals = isset($order_data['totals']) ? $order_data['totals'] : $altTotals ;
|
$orderTotals = isset($order_data['totals']) ? $order_data['totals'] : $altTotals ;
|
||||||
@ -58,7 +61,7 @@ class ModelRetailcrmOrder extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$order['createdAt'] = date('Y-m-d H:i:s');
|
$order['createdAt'] = $order_data['date_added'];
|
||||||
|
|
||||||
$payment_code = $order_data['payment_code'];
|
$payment_code = $order_data['payment_code'];
|
||||||
$order['paymentType'] = $settings['retailcrm_payment'][$payment_code];
|
$order['paymentType'] = $settings['retailcrm_payment'][$payment_code];
|
||||||
@ -165,10 +168,13 @@ class ModelRetailcrmOrder extends Model {
|
|||||||
$order['externalId'] = $order_id;
|
$order['externalId'] = $order_id;
|
||||||
$order['firstName'] = $order_data['firstname'];
|
$order['firstName'] = $order_data['firstname'];
|
||||||
$order['lastName'] = $order_data['lastname'];
|
$order['lastName'] = $order_data['lastname'];
|
||||||
$order['email'] = $order_data['email'];
|
|
||||||
$order['phone'] = $order_data['telephone'];
|
$order['phone'] = $order_data['telephone'];
|
||||||
$order['customerComment'] = $order_data['comment'];
|
$order['customerComment'] = $order_data['comment'];
|
||||||
|
|
||||||
|
if(!empty($order_data['email'])) {
|
||||||
|
$order['email'] = $order_data['email'];
|
||||||
|
}
|
||||||
|
|
||||||
$deliveryCost = 0;
|
$deliveryCost = 0;
|
||||||
$orderTotals = isset($order_data['totals']) ? $order_data['totals'] : $order_data['order_total'] ;
|
$orderTotals = isset($order_data['totals']) ? $order_data['totals'] : $order_data['order_total'] ;
|
||||||
|
|
||||||
@ -178,7 +184,7 @@ class ModelRetailcrmOrder extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$order['createdAt'] = date('Y-m-d H:i:s');
|
$order['createdAt'] = $order_data['date_added'];
|
||||||
$order['paymentType'] = $settings['retailcrm_payment'][$payment_code];
|
$order['paymentType'] = $settings['retailcrm_payment'][$payment_code];
|
||||||
|
|
||||||
$country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ;
|
$country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ;
|
||||||
|
Loading…
Reference in New Issue
Block a user