Skip to content

Commit

Permalink
Добавлена передача дополнительных параметров в GET запросах (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellynoize authored Oct 14, 2024
1 parent 11248f5 commit c20b285
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v3.6.12
* Добавлена передача дополнительных параметров в GET запросах

## v3.6.11
* Добавлены подсказки в настройках модуля

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.11
3.6.12
9 changes: 8 additions & 1 deletion retailcrm/lib/api/RetailcrmHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ public function makeRequest(
);
}

$parameters = array_merge($this->defaultParameters, $parameters);
$parameters = self::METHOD_GET === $method
? array_merge($this->defaultParameters, $parameters, [
'cms_source' => 'PrestaShop',
'cms_version' => _PS_VERSION_,
'php_version' => function_exists('phpversion') ? phpversion() : '',
'module_version' => RetailCRM::VERSION,
])
: $parameters = array_merge($this->defaultParameters, $parameters);

$url = $this->url . $path;

Expand Down
3 changes: 1 addition & 2 deletions retailcrm/retailcrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@

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';
Expand Down

0 comments on commit c20b285

Please sign in to comment.