mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-04-11 12:50:55 +00:00
Добавлена передача версий модуля, php и cms в get-запросах к CRM
This commit is contained in:
parent
11248f5309
commit
8d0fc9161e
4 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
|||
## v3.6.12
|
||||
* Добавлена передача версий модуля, php и cms в get-запросах к CRM
|
||||
|
||||
## v3.6.11
|
||||
* Добавлены подсказки в настройках модуля
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.6.11
|
||||
3.6.12
|
||||
|
|
|
@ -43,6 +43,7 @@ class RetailcrmHttpClient
|
|||
|
||||
protected $url;
|
||||
protected $defaultParameters;
|
||||
protected $versionData;
|
||||
|
||||
/**
|
||||
* Client constructor.
|
||||
|
@ -61,7 +62,13 @@ class RetailcrmHttpClient
|
|||
}
|
||||
|
||||
$this->url = $url;
|
||||
$this->defaultParameters = $defaultParameters;
|
||||
$this->defaultParameters = $defaultParameters;
|
||||
$this->versionData = [
|
||||
'php_version' => function_exists('phpversion') ? phpversion() : '',
|
||||
'cms_source' => 'PrestaShop',
|
||||
'module_version' => RetailCRM::VERSION,
|
||||
'cms_version' => _PS_VERSION_
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -106,7 +113,11 @@ class RetailcrmHttpClient
|
|||
);
|
||||
}
|
||||
|
||||
$parameters = array_merge($this->defaultParameters, $parameters);
|
||||
if (self::METHOD_GET === $method) {
|
||||
$parameters = array_merge($this->defaultParameters, $parameters, $this->versionData);
|
||||
} else {
|
||||
$parameters = array_merge($this->defaultParameters, $parameters);
|
||||
}
|
||||
|
||||
$url = $this->url . $path;
|
||||
|
||||
|
|
|
@ -48,8 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
|
|||
|
||||
class RetailCRM extends Module
|
||||
{
|
||||
const VERSION = '3.6.11';
|
||||
|
||||
const VERSION = '3.6.12';
|
||||
const API_URL = 'RETAILCRM_ADDRESS';
|
||||
const API_KEY = 'RETAILCRM_API_TOKEN';
|
||||
const DELIVERY = 'RETAILCRM_API_DELIVERY';
|
||||
|
|
Loading…
Add table
Reference in a new issue