diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aba642..2f4c336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v.3.3.1 +* Исправлен баг с передачей данных заказа в retailCRM при получении истории изменений от retailCRM + ## v.3.3.0 * Добавена настройка записи истории изменения заказов в Opencart * Устранен баг с вызовом события редактирования заказа при выгрузке истории изменений из retailCRM diff --git a/VERSION b/VERSION index 15a2799..bea438e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.0 +3.3.1 diff --git a/src/upload/admin/model/extension/retailcrm/history/v4_5.php b/src/upload/admin/model/extension/retailcrm/history/v4_5.php index 36ca4c2..910577b 100644 --- a/src/upload/admin/model/extension/retailcrm/history/v4_5.php +++ b/src/upload/admin/model/extension/retailcrm/history/v4_5.php @@ -472,9 +472,7 @@ class ModelExtensionRetailcrmHistoryV45 extends ModelExtensionRetailcrmHistory if (isset($this->settings[$this->moduleTitle . '_status_changes']) && $this->settings[$this->moduleTitle . '_status_changes'] ) { - \retailcrm\Retailcrm::$history_run = true; $this->opencartApiClient->addHistory($order['externalId'], $data['order_status_id']); - \retailcrm\Retailcrm::$history_run = false; } } } diff --git a/src/upload/catalog/controller/api/retailcrm.php b/src/upload/catalog/controller/api/retailcrm.php index 4dfa9a2..35fb491 100644 --- a/src/upload/catalog/controller/api/retailcrm.php +++ b/src/upload/catalog/controller/api/retailcrm.php @@ -45,7 +45,9 @@ class ControllerApiRetailcrm extends Controller $response = array('error' => 'Not found data'); } else { $this->load->model('checkout/order'); + \retailcrm\Retailcrm::$history_run = true; $this->model_checkout_order->addOrderHistory($this->request->post['order_id'], $this->request->post['order_status_id']); + \retailcrm\Retailcrm::$history_run = false; $response = array('success' => true); }