This commit is contained in:
Almaz Bazarov 2022-10-18 12:39:50 +02:00
parent 5ceae3024d
commit 6cbd5a4762

View file

@ -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();