Status in orders upload (#61)

This commit is contained in:
Akolzin Dmitry 2017-11-10 17:22:42 +03:00 committed by GitHub
parent 680e1c28fe
commit 51404a5533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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']);