Merge pull request #45 from iyzoer/master

Bug fixes
This commit is contained in:
Akolzin Dmitry 2017-08-29 16:19:08 +02:00 committed by GitHub
commit 73ea249145
3 changed files with 4 additions and 5 deletions

View File

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

View File

@ -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()

View File

@ -43,7 +43,6 @@ class RetailcrmProxy
$error = implode("\n", $response['errors']);
error_log($date .' '. $error . "\n", 3, $this->log);
}
$response = false;
}
return $response;