mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 14:46:06 +03:00
fix createdAt and email
This commit is contained in:
parent
b4c386b069
commit
3dc8ae3245
@ -29,10 +29,13 @@ class ModelRetailcrmOrder extends Model {
|
||||
$order['externalId'] = $order_data['order_id'];
|
||||
$order['firstName'] = $order_data['firstname'];
|
||||
$order['lastName'] = $order_data['lastname'];
|
||||
$order['email'] = $order_data['email'];
|
||||
$order['phone'] = $order_data['telephone'];
|
||||
$order['customerComment'] = $order_data['comment'];
|
||||
|
||||
if(!empty($order_data['email'])) {
|
||||
$order['email'] = $order_data['email'];
|
||||
}
|
||||
|
||||
$order['customer']['externalId'] = $order_data['customer_id'];
|
||||
|
||||
$deliveryCost = 0;
|
||||
|
@ -42,10 +42,13 @@ class ModelRetailcrmOrder extends Model {
|
||||
$order['externalId'] = $order_id;
|
||||
$order['firstName'] = $order_data['firstname'];
|
||||
$order['lastName'] = $order_data['lastname'];
|
||||
$order['email'] = $order_data['email'];
|
||||
$order['phone'] = $order_data['telephone'];
|
||||
$order['customerComment'] = $order_data['comment'];
|
||||
|
||||
if(!empty($order_data['email'])) {
|
||||
$order['email'] = $order_data['email'];
|
||||
}
|
||||
|
||||
$deliveryCost = 0;
|
||||
$altTotals = isset($order_data['order_total']) ? $order_data['order_total'] : "";
|
||||
$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'];
|
||||
$order['paymentType'] = $settings['retailcrm_payment'][$payment_code];
|
||||
@ -165,10 +168,13 @@ class ModelRetailcrmOrder extends Model {
|
||||
$order['externalId'] = $order_id;
|
||||
$order['firstName'] = $order_data['firstname'];
|
||||
$order['lastName'] = $order_data['lastname'];
|
||||
$order['email'] = $order_data['email'];
|
||||
$order['phone'] = $order_data['telephone'];
|
||||
$order['customerComment'] = $order_data['comment'];
|
||||
|
||||
if(!empty($order_data['email'])) {
|
||||
$order['email'] = $order_data['email'];
|
||||
}
|
||||
|
||||
$deliveryCost = 0;
|
||||
$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];
|
||||
|
||||
$country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ;
|
||||
|
Loading…
Reference in New Issue
Block a user