From 51404a55339c73dbea805fd62e40ac25b1baa254 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Fri, 10 Nov 2017 17:22:42 +0300 Subject: [PATCH] Status in orders upload (#61) --- admin/model/extension/retailcrm/order.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/model/extension/retailcrm/order.php b/admin/model/extension/retailcrm/order.php index 87d3316..4e674bb 100644 --- a/admin/model/extension/retailcrm/order.php +++ b/admin/model/extension/retailcrm/order.php @@ -92,6 +92,7 @@ class ModelExtensionRetailcrmOrder extends Model { } $country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ; + $order['delivery'] = array( 'code' => !empty($delivery_code) ? $this->settings[$this->moduleTitle . '_delivery'][$delivery_code] : '', @@ -174,6 +175,10 @@ class ModelExtensionRetailcrmOrder extends Model { $order['items'][] = $item; } + if (isset($order_data['order_status_id']) && $order_data['order_status_id'] > 0) { + $order['status'] = $this->settings[$this->moduleTitle . '_status'][$order_data['order_status_id']]; + } + if (isset($this->settings[$this->moduleTitle . '_custom_field']) && $order_data['custom_field']) { $customFields = json_decode($order_data['custom_field']);