From 6cbd5a47625407da6dfbf1df99d78b7f5602bc29 Mon Sep 17 00:00:00 2001 From: Almaz Bazarov Date: Tue, 18 Oct 2022 12:39:50 +0200 Subject: [PATCH] Fix --- retailcrm/lib/settings/RetailcrmSettings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retailcrm/lib/settings/RetailcrmSettings.php b/retailcrm/lib/settings/RetailcrmSettings.php index 9ebbec2..7bdaf4d 100644 --- a/retailcrm/lib/settings/RetailcrmSettings.php +++ b/retailcrm/lib/settings/RetailcrmSettings.php @@ -68,17 +68,17 @@ class RetailcrmSettings */ public function save() { - $changed = $this->settings->getChanged(); - if ($this->validator->validate(true)) { $this->settings->updateValueAll(); - if (array_key_exists('apiKey', $changed)) { + if (array_key_exists('apiKey', $this->settings->getChanged())) { $this->setClientId(); RetailCRM::updateCrmModuleState(Context::getContext()->shop->id); } } + $changed = $this->settings->getChanged(); + if ($this->consultantScript->issetValue()) { $this->updateConsultantCode(); $changed['consultantScript'] = $this->consultantScript->getValueStored();