mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 13:16:07 +03:00
commit
73ea249145
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
@ -43,7 +43,6 @@ class RetailcrmProxy
|
||||
$error = implode("\n", $response['errors']);
|
||||
error_log($date .' '. $error . "\n", 3, $this->log);
|
||||
}
|
||||
$response = false;
|
||||
}
|
||||
|
||||
return $response;
|
||||
|
Loading…
Reference in New Issue
Block a user