Skip to content

Commit d22f38d

Browse files
authored
Merge pull request #126 from leemyongpakvn/analytics-Multistore_confirmation_condition
Display Cross-Domain confirmation only when Multistore Active
2 parents bcfbc14 + e7ded5e commit d22f38d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

classes/Form/ConfigurationForm.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ public function generate()
204204
*/
205205
public function treat()
206206
{
207+
// Check if multistore is active
208+
$is_multistore_active = Shop::isFeatureActive();
209+
207210
$treatmentResult = '';
208211
$gaAccountId = Tools::getValue('GA_ACCOUNT_ID');
209212
$gaUserIdEnabled = Tools::getValue('GA_USERID_ENABLED');
@@ -223,9 +226,9 @@ public function treat()
223226
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for User ID updated successfully', [], 'Modules.GAnalytics.Admin'));
224227
}
225228

226-
if (null !== $gaCrossdomainEnabled) {
229+
if ($is_multistore_active) {
227230
Configuration::updateValue('GA_CROSSDOMAIN_ENABLED', (bool) $gaCrossdomainEnabled);
228-
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for User ID updated successfully', [], 'Modules.GAnalytics.Admin'));
231+
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for Cross-Domain updated successfully', [], 'Modules.GAnalytics.Admin'));
229232
}
230233

231234
if (null !== $gaAnonymizeEnabled) {

0 commit comments

Comments
 (0)