mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 22:56:07 +03:00
Fix validate form on saved settings (#43)
This commit is contained in:
parent
82d93de94b
commit
05a47a90b5
@ -544,9 +544,9 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
$response = $this->retailcrm->statisticUpdate();
|
||||
$response = $this->retailcrm->deliveryTypesList();
|
||||
|
||||
if ($response['errorMsg'] == 'API method not found') {
|
||||
if ($response == false) {
|
||||
$this->_error['warning'] = $this->language->get('text_error_api');
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ $_['field_email'] = 'Email';
|
||||
$_['field_phone'] = 'Phone';
|
||||
$_['text_require'] = 'Require';
|
||||
$_['text_error_collector_fields']= 'Fill in the field names Daemon Collector';
|
||||
$_['text_error_api'] = 'The selected version of the API is unavailable';
|
||||
$_['text_error_api'] = 'The selected version of the API or method is unavailable';
|
||||
|
||||
$_['retailcrm_dict_delivery'] = 'Shipment methods';
|
||||
$_['retailcrm_dict_status'] = 'Order statuses';
|
||||
|
@ -41,7 +41,7 @@ $_['field_email'] = 'Email';
|
||||
$_['field_phone'] = 'Телефон';
|
||||
$_['text_require'] = 'Обязательно для заполнения';
|
||||
$_['text_error_collector_fields']= 'Заполните названия полей формы Демон Collector';
|
||||
$_['text_error_api'] = 'Недоступна выбранная версия API';
|
||||
$_['text_error_api'] = 'Недоступна выбранная версия API или метод.';
|
||||
|
||||
$_['retailcrm_dict_delivery'] = 'Способы доставки';
|
||||
$_['retailcrm_dict_status'] = 'Статусы';
|
||||
|
@ -10,8 +10,9 @@ class RetailcrmProxy
|
||||
private $api;
|
||||
private $log;
|
||||
|
||||
public function __construct($url, $key, $log, $version = 'v4')
|
||||
public function __construct($url, $key, $log, $version)
|
||||
{
|
||||
if (!$version) $version = 'v4';
|
||||
switch ($version) {
|
||||
case 'v5':
|
||||
$this->api = new RetailcrmApiClient5($url, $key);
|
||||
|
Loading…
Reference in New Issue
Block a user