diff --git a/admin/controller/extension/module/retailcrm.php b/admin/controller/extension/module/retailcrm.php index 0525b8a..08c355c 100644 --- a/admin/controller/extension/module/retailcrm.php +++ b/admin/controller/extension/module/retailcrm.php @@ -546,7 +546,7 @@ class ControllerExtensionModuleRetailcrm extends Controller $response = $this->retailcrm->deliveryTypesList(); - if ($response == false) { + if (!$response->isSuccessful()) { $this->_error['warning'] = $this->language->get('text_error_api'); } diff --git a/admin/model/extension/retailcrm/references.php b/admin/model/extension/retailcrm/references.php index 54d7edc..d3b8768 100644 --- a/admin/model/extension/retailcrm/references.php +++ b/admin/model/extension/retailcrm/references.php @@ -83,7 +83,7 @@ class ModelExtensionRetailcrmReferences extends Model $response = $this->retailcrm->deliveryTypesList(); - return ($response === false) ? array() : $response->deliveryTypes; + return (!$response->isSuccessful()) ? array() : $response->deliveryTypes; } public function getApiOrderStatuses() @@ -92,7 +92,7 @@ class ModelExtensionRetailcrmReferences extends Model $response = $this->retailcrm->statusesList(); - return ($response === false) ? array() : $response->statuses; + return (!$response->isSuccessful()) ? array() : $response->statuses; } public function getApiPaymentTypes() @@ -101,7 +101,7 @@ class ModelExtensionRetailcrmReferences extends Model $response = $this->retailcrm->paymentTypesList(); - return ($response === false) ? array() : $response->paymentTypes; + return (!$response->isSuccessful()) ? array() : $response->paymentTypes; } protected function initApi() diff --git a/system/library/retailcrm/RetailcrmProxy.php b/system/library/retailcrm/RetailcrmProxy.php index 70d199f..872026e 100644 --- a/system/library/retailcrm/RetailcrmProxy.php +++ b/system/library/retailcrm/RetailcrmProxy.php @@ -43,7 +43,6 @@ class RetailcrmProxy $error = implode("\n", $response['errors']); error_log($date .' '. $error . "\n", 3, $this->log); } - $response = false; } return $response;