diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index 5dea769..6f09746 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -31,8 +31,10 @@ $aLang = [ // for cookie manager settings 'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?', - 'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER' => 'Nutzen Sie die Consentmanager-Einbindung?', - 'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER_NO' => 'Nein', - 'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER_YES' => 'Ja', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?
+ Dann wählen Sie bitte die zutreffende aus.', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_NONE' => '---', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_CONSENTMANAGER' => 'consentmanager', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_USERCENTRICS' => 'usercentrics', 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID', ]; diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index e64872f..33363b3 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -37,9 +37,21 @@ class ViewConfig extends ViewConfig_parent return $this->sContainerId; } - public function getModuleConsentmanagerSettingSelectValue() :bool + /** + * @return mixed + */ + public function getModuleSettingExplicitManagerSelectValue() { - return Registry::getConfig()->getConfigParam('d3_gtm_settings_HAS_CONSENTMANAGER') === 'YES'; + return Registry::getConfig()->getConfigParam('d3_gtm_settings_HAS_STD_MANAGER'); + } + + /** + * @return false|mixed + */ + public function getExplicitManager() + { + $sManagerName = $this->getModuleSettingExplicitManagerSelectValue(); + return $sManagerName === "---" ? false : $sManagerName; } public function getCookieManagerType() @@ -62,8 +74,8 @@ class ViewConfig extends ViewConfig_parent } } - if ($this->sCookieManagerType === false and $this->getModuleConsentmanagerSettingSelectValue()){ - return "consentmanager"; + if ($this->sCookieManagerType === false and $this->getExplicitManager()){ + return "externalService"; } return $this->sCookieManagerType; @@ -100,7 +112,7 @@ class ViewConfig extends ViewConfig_parent } // UserCentrics - if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getCookieManagerType() === 'consentmanager') { + if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getCookieManagerType() === 'externalService') { // Always needs the script-tags delivered to the DOM. return true; } @@ -118,7 +130,7 @@ class ViewConfig extends ViewConfig_parent { $oConfig = Registry::getConfig(); - if ($this->getCookieManagerType() == "oxps_usercentrics") { + if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getExplicitManager() === 'usercentrics') { $sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName'); if ($sCookieId) { @@ -126,7 +138,7 @@ class ViewConfig extends ViewConfig_parent } } - if ($this->getCookieManagerType() == "consentmanager") { + if ($this->getCookieManagerType() === "externalService" and $this->getExplicitManager() === 'consentmanager') { $sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName'); if ($sCookieId) { diff --git a/metadata.php b/metadata.php index 3a356b8..6a0e97b 100755 --- a/metadata.php +++ b/metadata.php @@ -122,10 +122,10 @@ $aModule = [ ], [ 'group' => 'd3_gtm_settings_cookiemanager', - 'name' => 'd3_gtm_settings_HAS_CONSENTMANAGER', + 'name' => 'd3_gtm_settings_HAS_STD_MANAGER', 'type' => 'select', 'value' => 'none', - 'constraints' => 'NO|YES', + 'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS', ], ] ]; \ No newline at end of file