From 565f47b1ff5136adfded6d1a8b1c98c4a75467a1 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 7 Sep 2023 15:08:06 +0200 Subject: [PATCH] add cookiebot essentials --- Application/Model/ManagerTypes.php | 5 ++++- Application/views/admin/de/module_options.php | 1 + Modules/Core/ViewConfig.php | 5 +++++ metadata.php | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Application/Model/ManagerTypes.php b/Application/Model/ManagerTypes.php index 01c9db5..f12af76 100644 --- a/Application/Model/ManagerTypes.php +++ b/Application/Model/ManagerTypes.php @@ -36,6 +36,8 @@ class ManagerTypes const COOKIEFIRST = "COOKIEFIRST"; + const COOKIEBOT = "COOKIEBOT"; + /** * @return array */ @@ -48,7 +50,8 @@ class ManagerTypes "oxps_usercentrics" => self::USERCENTRICS_MODULE, "usercentrics" => self::USERCENTRICS_MANUALLY, "consentmanager" => self::CONSENTMANAGER, - "cookiefirst" => self::COOKIEFIRST + "cookiefirst" => self::COOKIEFIRST, + "cookiebot" => self::COOKIEBOT, ]; } diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index 76204bd..35694eb 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -43,5 +43,6 @@ $aLang = [ '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_HAS_STD_MANAGER_COOKIEFIRST' => 'cookiefirst', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_COOKIEBOT' => 'Cookiebot', 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID', ]; diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index 0f96b8e..8e22842 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -98,6 +98,7 @@ class ViewConfig extends ViewConfig_parent or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST + or $this->sCookieManagerType === ManagerTypes::COOKIEBOT or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE ) { @@ -148,6 +149,10 @@ class ViewConfig extends ViewConfig_parent return 'type="text/plain" data-cookiefirst-category="' . $sCookieId .'"'; } + if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){ + return 'type="text/plain" data-cookieconsent="' . $sCookieId .'"'; + } + return ""; } diff --git a/metadata.php b/metadata.php index 54b809e..087e353 100755 --- a/metadata.php +++ b/metadata.php @@ -141,7 +141,7 @@ $aModule = [ 'name' => 'd3_gtm_settings_HAS_STD_MANAGER', 'type' => 'select', 'value' => 'none', - 'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST', + 'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST|COOKIEBOT', ], ] ]; \ No newline at end of file