mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 22:56:07 +03:00
commit
73ea249145
@ -546,7 +546,7 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
|||||||
|
|
||||||
$response = $this->retailcrm->deliveryTypesList();
|
$response = $this->retailcrm->deliveryTypesList();
|
||||||
|
|
||||||
if ($response == false) {
|
if (!$response->isSuccessful()) {
|
||||||
$this->_error['warning'] = $this->language->get('text_error_api');
|
$this->_error['warning'] = $this->language->get('text_error_api');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class ModelExtensionRetailcrmReferences extends Model
|
|||||||
|
|
||||||
$response = $this->retailcrm->deliveryTypesList();
|
$response = $this->retailcrm->deliveryTypesList();
|
||||||
|
|
||||||
return ($response === false) ? array() : $response->deliveryTypes;
|
return (!$response->isSuccessful()) ? array() : $response->deliveryTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApiOrderStatuses()
|
public function getApiOrderStatuses()
|
||||||
@ -92,7 +92,7 @@ class ModelExtensionRetailcrmReferences extends Model
|
|||||||
|
|
||||||
$response = $this->retailcrm->statusesList();
|
$response = $this->retailcrm->statusesList();
|
||||||
|
|
||||||
return ($response === false) ? array() : $response->statuses;
|
return (!$response->isSuccessful()) ? array() : $response->statuses;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApiPaymentTypes()
|
public function getApiPaymentTypes()
|
||||||
@ -101,7 +101,7 @@ class ModelExtensionRetailcrmReferences extends Model
|
|||||||
|
|
||||||
$response = $this->retailcrm->paymentTypesList();
|
$response = $this->retailcrm->paymentTypesList();
|
||||||
|
|
||||||
return ($response === false) ? array() : $response->paymentTypes;
|
return (!$response->isSuccessful()) ? array() : $response->paymentTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function initApi()
|
protected function initApi()
|
||||||
|
@ -43,7 +43,6 @@ class RetailcrmProxy
|
|||||||
$error = implode("\n", $response['errors']);
|
$error = implode("\n", $response['errors']);
|
||||||
error_log($date .' '. $error . "\n", 3, $this->log);
|
error_log($date .' '. $error . "\n", 3, $this->log);
|
||||||
}
|
}
|
||||||
$response = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
Loading…
Reference in New Issue
Block a user