public function saveConfigurationToAlgolia($storeId, $saveToTmpIndicesToo = false) { $this->algolia_helper->resetCredentialsFromConfig(); if (!($this->config->getApplicationID() && $this->config->getAPIKey())) { return; } if ($this->config->isEnabledBackend($storeId) === false) { $this->logger->log('INDEXING IS DISABLED FOR ' . $this->logger->getStoreName($storeId)); return; } $this->algolia_helper->setSettings($this->category_helper->getIndexName($storeId), $this->category_helper->getIndexSettings($storeId)); $this->algolia_helper->setSettings($this->page_helper->getIndexName($storeId), $this->page_helper->getIndexSettings($storeId)); $this->algolia_helper->setSettings($this->suggestion_helper->getIndexName($storeId), $this->suggestion_helper->getIndexSettings($storeId)); foreach ($this->config->getAutocompleteSections() as $section) { if ($section['name'] === 'products' || $section['name'] === 'categories' || $section['name'] === 'pages' || $section['name'] === 'suggestions') { continue; } $this->algolia_helper->setSettings($this->additionalsections_helper->getIndexName($storeId) . '_' . $section['name'], $this->additionalsections_helper->getIndexSettings($storeId)); } $this->product_helper->setSettings($storeId, $saveToTmpIndicesToo); }