From c20b285b1116fb65817f617a4a9615a4020eb055 Mon Sep 17 00:00:00 2001 From: ellynoize <111681973+ellynoize@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:16:50 +0600 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87=D0=B0?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D1=85=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B2=20=D0=B2=20GET=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D0=B0=D1=85=20(#229)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ VERSION | 2 +- retailcrm/lib/api/RetailcrmHttpClient.php | 9 ++++++++- retailcrm/retailcrm.php | 3 +-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9fb4438..ef2d4716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.6.12 +* Добавлена передача дополнительных параметров в GET запросах + ## v3.6.11 * Добавлены подсказки в настройках модуля diff --git a/VERSION b/VERSION index e8b6c77d..8b7b0b52 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.11 +3.6.12 diff --git a/retailcrm/lib/api/RetailcrmHttpClient.php b/retailcrm/lib/api/RetailcrmHttpClient.php index f6419a4d..d63ebf1f 100644 --- a/retailcrm/lib/api/RetailcrmHttpClient.php +++ b/retailcrm/lib/api/RetailcrmHttpClient.php @@ -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; diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index d9e77dce..c573401f 100755 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -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';