diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/admin/model/retailcrm/order.php b/admin/model/retailcrm/order.php index 628584c..c22c42f 100644 --- a/admin/model/retailcrm/order.php +++ b/admin/model/retailcrm/order.php @@ -52,7 +52,7 @@ class ModelRetailcrmOrder extends Model { } } - $order['createdAt'] = date('Y-m-d H:i:s'); + $order['createdAt'] = isset($order_data['date_added']) ? $order_data['date_added'] : date('Y-m-d H:i:s'); $payment_code = $order_data['payment_code']; $order['paymentType'] = $settings['retailcrm_payment'][$payment_code]; @@ -154,9 +154,7 @@ class ModelRetailcrmOrder extends Model { } } - $order['createdAt'] = date('Y-m-d H:i:s'); $order['paymentType'] = $settings['retailcrm_payment'][$payment_code]; - $country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ; $order['delivery'] = array( diff --git a/catalog/model/retailcrm/order.php b/catalog/model/retailcrm/order.php index d37acae..0eaae5d 100644 --- a/catalog/model/retailcrm/order.php +++ b/catalog/model/retailcrm/order.php @@ -56,7 +56,7 @@ class ModelRetailcrmOrder extends Model { } } - $order['createdAt'] = date('Y-m-d H:i:s'); + $order['createdAt'] = isset($order_data['date_added']) ? $order_data['date_added'] : date('Y-m-d H:i:s'); $payment_code = $order_data['payment_code']; $order['paymentType'] = $settings['retailcrm_payment'][$payment_code]; @@ -162,9 +162,7 @@ class ModelRetailcrmOrder extends Model { } } - $order['createdAt'] = date('Y-m-d H:i:s'); $order['paymentType'] = $settings['retailcrm_payment'][$payment_code]; - $country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ; $order['delivery'] = array(