Compare commits

...

12 Commits

Author SHA1 Message Date
2cd0652c31 don't submit item prices, if user doesn't have "show price" right
# Conflicts:
#	Application/views/ga4/remove_from_cart.tpl
#	Application/views/ga4/view_search_result.tpl
2024-11-15 13:46:04 +01:00
df179568c9 use Constants ergänzt 2024-11-04 15:20:44 +01:00
a702a211ef [Added] module-activated check
since its a private method in OXID7
2024-10-05 19:01:00 +02:00
9fde587cfd [Fixed] template paths 2024-10-05 18:59:21 +02:00
6111cf50ad Merge branch 'dev_3.x_OXID7' of https://git.d3data.de/D3Public/GoogleAnalytics4 into dev_3.x_OXID7 2024-10-05 18:15:57 +02:00
474737bcdc [Changed] composer reqs 2024-10-05 18:14:57 +02:00
c539c898d9 [Changed] OXID 7 file adjustments 2024-09-21 18:16:52 +02:00
8bbf7e4fa7 [Changed] OXID7 metadata adjustments 2024-09-21 18:15:57 +02:00
2ec373c95f [Bump] Metadata && Changelog 2024-09-21 16:23:06 +02:00
6fcb9f8b84 [Changed] add "internal_names" to constant 2024-09-21 16:20:48 +02:00
53b3c878ce [Fixed] Consentmanager doesn't get delivered
false value given for important decision-making. Since the value was false, we got "false" as return for D3blShowGtmScript() which made consentmanager not send the data to GTM
2024-09-21 16:08:08 +02:00
65b618e25c [Removed] unnecessary "none" entry for CMP-choosability 2024-09-21 16:06:32 +02:00
54 changed files with 177 additions and 222 deletions

View File

@ -12,7 +12,7 @@ use OxidEsales\Eshop\Core\ViewConfig;
class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController
{
protected $_sThisTemplate = 'ga4/admin/d3ga4uimain.tpl';
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uimain';
public function render()
{

View File

@ -17,7 +17,7 @@ class ManagerHandler
/** @var ManagerTypes $oManagerTypes */
$oManagerTypes = oxNew(ManagerTypes::class);
/** @var ViewConfig $oViewConfig */
/** @var ViewConfig|\D3\GoogleAnalytics4\Modules\Core\ViewConfig $oViewConfig */
$oViewConfig = oxNew(ViewConfig::class);
$aManagerList = $oManagerTypes->getManagerList();
@ -27,7 +27,7 @@ class ManagerHandler
}
foreach ($aManagerList as $shopModuleId => $publicCMPName){
if ($oViewConfig->isModuleActive($shopModuleId)){
if ($oViewConfig->d3IsModuleActive($shopModuleId)){
$this->d3SaveShopConfVar($shopModuleId);
return $shopModuleId;
}

View File

@ -7,19 +7,25 @@ use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
class ManagerTypes
{
const EXTERNAL_SERVICE = "eigener Service";
const INTERNAL_EXTERNAL_SERVICE = "externalService";
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
const INTERNAL_NET_COOKIE_MANAGER = "net_cookie_manager";
/**
* Further information's:
* https://github.com/aggrosoft/oxid-cookie-compliance
*/
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
const INTERNAL_AGCOOKIECOMPLIANCE = "agcookiecompliance";
const CONSENTMANAGER = "Consentmanager";
const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
const COOKIEFIRST = "Cookiefirst";
const INTERNAL_COOKIEFIRST = "cookiefirst";
const COOKIEBOT = "Cookiebot";
const INTERNAL_COOKIEBOT = "cookiebot";
/**
* @return array
@ -27,14 +33,14 @@ class ManagerTypes
public function getManagerList(): array
{
return [
"externalService" => self::EXTERNAL_SERVICE,
"agcookiecompliance" => self::AGCOOKIECOMPLIANCE,
"net_cookie_manager" => self::NET_COOKIE_MANAGER,
self::INTERNAL_EXTERNAL_SERVICE => self::EXTERNAL_SERVICE,
self::INTERNAL_AGCOOKIECOMPLIANCE => self::AGCOOKIECOMPLIANCE,
self::INTERNAL_NET_COOKIE_MANAGER => self::NET_COOKIE_MANAGER,
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
"cmconsentmanager" => self::CONSENTMANAGER,
"cookiefirst" => self::COOKIEFIRST,
"cookiebot" => self::COOKIEBOT,
self::INTERNAL_CONSENTMANAGER => self::CONSENTMANAGER,
self::INTERNAL_COOKIEFIRST => self::COOKIEFIRST,
self::INTERNAL_COOKIEBOT => self::COOKIEBOT,
];
}
@ -46,4 +52,21 @@ class ManagerTypes
{
return in_array($sManager, array_keys($this->getManagerList()), true);
}
/**
* @return array
*
* the CMP from this method always needs the script tag delivered to the dom.
*/
public function scriptTagDeliveredByDefaultArray() :array
{
return [
Usercentrics::sModuleIncludationInternalName,
Usercentrics::sExternalIncludationInternalName,
ManagerTypes::INTERNAL_CONSENTMANAGER,
ManagerTypes::INTERNAL_COOKIEFIRST,
ManagerTypes::INTERNAL_COOKIEBOT,
ManagerTypes::INTERNAL_EXTERNAL_SERVICE
];
}
}

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/add_payment_info.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/begin_checkout.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/purchase.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/remove_from_cart.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/view_cart.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/view_item.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/view_item_list.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/view_search_result.tpl"}]

View File

@ -1,48 +0,0 @@
[{$smarty.block.parent}]
[{block name="d3_ga4_remove_from_cart_block"}]
[{if $hasBeenReloaded}]
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
[{capture assign=d3_ga4_remove_from_cart}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
'isRemoveFromCart': true,
'event': 'remove_from_cart',
'eventLabel':'remove_from_cart',
'ecommerce': {
'actionField': "step: 1",
'currency': "[{$currency->name}]",
'value': [{$d3BasketPrice->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'items': [
[{foreach from=$toRemoveArticles->getArray() name=gtmRemovedItems item=rmItem key=rmItemindex}]
[{assign var="d3oItemPrice" value=$rmItem->getPrice()}]
[{assign var="gtmBasketItemCategory" value=$rmItem->getCategory()}]
{
'item_id': '[{$rmItem->getFieldData('oxartnum')}]',
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
[{if $gtmBasketItemCategory}]
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$d3oItemPrice->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': '[{$rmItem->getFieldData('d3AmountThatGotRemoved')}]',
'position': [{$smarty.foreach.gtmRemovedItems.index}]
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
[{/foreach}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_remove_from_cart}]
[{/if}]
[{/block}]

View File

@ -1,44 +0,0 @@
[{$smarty.block.parent}]
[{assign var="gtmProducts" value=$oView->getArticleList()}]
[{block name="d3_ga4_view_search_result_block"}]
[{if $gtmProducts}]
[{capture assign=d3_ga4_view_search_result}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
'event': 'view_search_result',
'eventLabel':'view_search_result[{if $oViewConf->isDebugModeOn()}]_test[{/if}]',
'ecommerce': {
'search_term': '[{$searchparamforhtml}]',
'items': [
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
{
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
'price': [{$d3PriceObject->getPrice()}],
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
[{if $gtmCategory}]
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
[{/if}]
'quantity': 1
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
[{/foreach}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_search_result}]
[{/if}]
[{/block}]

View File

@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.17.2...rel_2.x) - 2024-x
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.22.0...rel_2.x) - 2024-x
### Added
- data layer doesn't contain prices if current user hasn't "show price" rights
## [2.22.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.21.0...2.22.0) - 2024-09-21
### Fixed
- Consentmanager didn't get delivered
### Changed
- write "internal_names" of CMP to constants
## [2.21.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.20.1...2.21.0) - 2024-09-19
### Fixed

View File

@ -16,7 +16,7 @@ class ThankYouController extends ThankYouController_parent
$oOrder = $this->getOrder();
$sCountryId = $oOrder->getFieldData('oxbillcountryid');
/** @var Country $oCountry */
/** @var Country::class $oCountry */
$oCountry = oxNew(Country::class);
$oCountry->load($sCountryId);

View File

@ -2,9 +2,11 @@
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
use D3\GoogleAnalytics4\Application\Model\Constants;
class d3GtmAccountNoticeListController extends d3GtmAccountNoticeListController_parent
{
protected $_sThisTemplate = 'page/account/d3gtmnoticelist.tpl';
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmnoticelist.tpl';
public function render()
{

View File

@ -2,9 +2,11 @@
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
use D3\GoogleAnalytics4\Application\Model\Constants;
class d3GtmAccountRecommlistController extends d3GtmAccountRecommlistController_parent
{
protected $_sThisTemplate = 'page/account/d3gtmrecommendationlist.tpl';
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmrecommendationlist.tpl';
public function render()
{

View File

@ -2,9 +2,11 @@
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
use D3\GoogleAnalytics4\Application\Model\Constants;
class d3GtmAccountWishlistController extends d3GtmAccountWishlistController_parent
{
protected $_sThisTemplate = 'page/account/d3gtmwishlist.tpl';
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmwishlist.tpl';
public function render()
{

View File

@ -18,9 +18,11 @@ use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
use OxidEsales\Eshop\Application\Controller\FrontendController;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Application\Model\User;use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Exception\ModuleConfigurationNotFoundException;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Setup\Bridge\ModuleActivationBridgeInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
@ -88,7 +90,7 @@ class ViewConfig extends ViewConfig_parent
$sCookieID = trim($this->d3GetModuleConfigParam('_sControlParameter'));
// Netensio Cookie Manager
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_NET_COOKIE_MANAGER) {
$oSession = Registry::getSession();
$aCookies = $oSession->getVariable("aCookieSel");
@ -96,20 +98,18 @@ class ViewConfig extends ViewConfig_parent
}
// Aggrosoft Cookie Consent
if ($this->sCookieManagerType === ManagerTypes::AGCOOKIECOMPLIANCE) {
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_AGCOOKIECOMPLIANCE) {
if (method_exists($this, "isCookieCategoryEnabled")) {
return $this->isCookieCategoryEnabled($sCookieID);
}
}
// UserCentrics or consentmanager
if (
$this->sCookieManagerType === Usercentrics::sModuleIncludationInternalName
or $this->sCookieManagerType === Usercentrics::sExternalIncludationInternalName
or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER
or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST
or $this->sCookieManagerType === ManagerTypes::COOKIEBOT
or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE
in_array
(
$this->sCookieManagerType,
(oxNew(ManagerTypes::class)->scriptTagDeliveredByDefaultArray())
)
)
{
// Always needs the script-tags delivered to the DOM.
@ -141,16 +141,16 @@ class ViewConfig extends ViewConfig_parent
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
}
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_CONSENTMANAGER)
{
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
}
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEFIRST){
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
}
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEBOT){
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
}
@ -258,4 +258,26 @@ class ViewConfig extends ViewConfig_parent
return (bool) ($sCMPPubName === Usercentrics::sExternalIncludationInternalName
or $sCMPPubName === Usercentrics::sModuleIncludationInternalName);
}
/**
* @return bool
*/
public function d3IsModuleActive(string $sModuleId) :bool
{
/** @var ModuleActivationBridgeInterface $moduleActivationBridge */
$moduleActivationBridge = $this
->getContainer()
->get(ModuleActivationBridgeInterface::class);
try {
$isActiveBool = $moduleActivationBridge->isActive(
$sModuleId,
Registry::getConfig()->getShopId()
);
}catch (\Exception|ModuleConfigurationNotFoundException $e){
return false;
}
return (bool) $isActiveBool;
}
}

0
thumbnail.png → assets/thumbnail.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -28,29 +28,18 @@
"homepage": "https://www.d3data.de"
}
],
"support": {
"supports": {
"email": "support@shopmodule.com"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json",
".php-cs-fixer.php",
"*.neon"
],
"target-directory": "d3/googleanalytics4"
}
},
"require": {
"php": "7.1 - 8.2",
"oxid-esales/oxideshop-ce": "^6.5.3",
"php": "^8.0",
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
"google/apiclient":" ^2.0",
"phpstan/phpstan": "^1.10"
},
"autoload": {
"psr-4": {
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
"D3\\GoogleAnalytics4\\": ""
}
}
}

View File

@ -52,7 +52,7 @@ $aModule = [
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
",
'thumbnail' => 'thumbnail.png',
'version' => '2.21.0',
'version' => '3.0.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
@ -88,97 +88,97 @@ $aModule = [
],
'templates' => [
// Event files that store the GA4 Event-Information
'event/add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/event/add_to_cart.tpl',
'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
'event/begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/event/begin_checkout.tpl',
'event/add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/event/add_payment_info.tpl',
'event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl',
'event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.tpl',
'event/view_search_result.tpl' => 'd3/googleanalytics4/Application/views/event/view_search_result.tpl',
'event/remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/event/remove_from_cart.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/add_to_cart.tpl' => 'views/smarty/event/add_to_cart.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/view_item.tpl' => 'views/smarty/event/view_item.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/view_item.tpl' => 'views/smarty/event/view_item.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/begin_checkout.tpl' => 'views/smarty/event/begin_checkout.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/add_payment_info.tpl' => 'views/smarty/event/add_payment_info.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/purchase.tpl' => 'views/smarty/event/purchase.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/view_item_list.tpl' => 'views/smarty/event/view_item_list.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/view_search_result.tpl' => 'views/smarty/event/view_search_result.tpl',
'@' . Constants::OXID_MODULE_ID . '/event/remove_from_cart.tpl' => 'views/smarty/event/remove_from_cart.tpl',
// complete overwritten file of OXID-Originals
// the path of the template-name is the original path to the file in OXID-context from tpl/->
'page/account/d3gtmnoticelist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmnoticelist.tpl',
'page/account/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl',
'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl',
'@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmnoticelist.tpl' => 'views/smarty/page/account/d3gtmnoticelist.tpl',
'@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmrecommendationlist.tpl' => 'views/smarty/page/account/d3gtmrecommendationlist.tpl',
'@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmwishlist.tpl' => 'views/smarty/page/account/d3gtmwishlist.tpl',
// Admin Templates
'ga4/admin/d3ga4uimain.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_main.tpl',
'ga4/admin/d3ga4uiheaditem.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_headitem.tpl',
'@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uimain.tpl' => 'views/smarty/admin/d3googleanalytics4_main.tpl',
'@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uiheaditem.tpl' => 'views/smarty/admin/d3googleanalytics4_headitem.tpl',
],
'blocks' => [
// tag manager js
[
'template' => 'layout/base.tpl',
'block' => 'head_meta_robots',
'file' => '/Application/views/blocks/_gtm_js.tpl',
'file' => 'views/smarty/blocks/_gtm_js.tpl',
'position' => 150
],
// tag manager nojs
[
'template' => 'layout/base.tpl',
'block' => 'theme_svg_icons',
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
'file' => 'views/smarty/blocks/_gtm_nojs.tpl'
],
// details
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_title',
'file' => '/Application/views/blocks/view_item.tpl',
'file' => 'views/smarty/blocks/view_item.tpl',
'position' => 150
],
// View Cart
[
'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main',
'file' => '/Application/views/blocks/view_cart.tpl'
'file' => 'views/smarty/blocks/view_cart.tpl'
],
// add_to_cart
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_tobasket',
'file' => '/Application/views/blocks/details_productmain_tobasket.tpl',
'file' => 'views/smarty/blocks/details_productmain_tobasket.tpl',
'position' => 150
],
// remove_from_cart
[
'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main',
'file' => '/Application/views/blocks/remove_from_cart.tpl',
'file' => 'views/smarty/blocks/remove_from_cart.tpl',
'position' => 150
],
[
'template' => 'page/checkout/thankyou.tpl',
'block' => 'checkout_thankyou_main',
'file' => '/Application/views/blocks/purchase.tpl'
'file' => 'views/smarty/blocks/purchase.tpl'
],
// Lists
// view_item_list
[
'template' => 'page/list/list.tpl',
'block' => 'page_list_productlist',
'file' => '/Application/views/blocks/view_item_list.tpl',
'file' => 'views/smarty/blocks/view_item_list.tpl',
'position' => 150
],
// view_search_result
[
'template' => 'page/search/search.tpl',
'block' => 'search_results',
'file' => '/Application/views/blocks/view_search_result.tpl',
'file' => 'views/smarty/blocks/view_search_result.tpl',
'position' => 150
],
[
'template' => 'page/list/list.tpl',
'block' => 'page_list_listbody',
'file' => '/Application/views/blocks/page_list_listbody.tpl',
'file' => 'views/smarty/blocks/page_list_listbody.tpl',
'position' => 150
],
[
'template' => 'page/shop/start.tpl',
'block' => 'start_welcome_text',
'file' => '/Application/views/blocks/start_welcome_text.tpl',
'file' => 'views/smarty/blocks/start_welcome_text.tpl',
'position' => 150
],
// Checkout process
@ -186,7 +186,7 @@ $aModule = [
[
'template' => 'page/checkout/user.tpl',
'block' => 'checkout_user_main',
'file' => '/Application/views/blocks/begin_checkout.tpl',
'file' => 'views/smarty/blocks/begin_checkout.tpl',
'position' => 150
],
// Add payment info
@ -195,7 +195,7 @@ $aModule = [
[
'template' => 'page/checkout/order.tpl',
'block' => 'checkout_order_main',
'file' => '/Application/views/blocks/add_payment_info.tpl',
'file' => 'views/smarty/blocks/add_payment_info.tpl',
'position' => 150
],
],

View File

@ -80,7 +80,6 @@
[{oxmultilang ident="D3CMP"}]
</label>
<select class="form-select w-50" name="editval[select][_HAS_STD_MANAGER]" aria-label="Default select example">
<option value="NONE" selected>[{oxmultilang ident="D3NONE"}]</option>
[{foreach from=$d3ManagerTypeArray key="sInternalName" item="sPublicName" name="editval[aCmpNameArray]"}]
<option value="[{$sInternalName}]" [{if $sInternalName === $d3CurrentCMP}]SELECTED[{/if}]>[{$sPublicName}]</option>
[{/foreach}]

View File

@ -1,12 +1,12 @@
[{if $oViewConf->D3blShowGtmScript()}]
[{if $oViewConf->getGtmContainerId()}][{strip}]
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
[{/strip}][{/if}]
[{/if}]
[{if $oViewConf->D3blShowGtmScript()}]
[{if $oViewConf->getGtmContainerId()}][{strip}]
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
[{/strip}][{/if}]
[{/if}]
[{$smarty.block.parent}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/add_payment_info.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/begin_checkout.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/purchase.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/remove_from_cart.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/view_cart.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/view_item.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/view_item_list.tpl"}]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3googleanalytics4/event/view_search_result.tpl"}]

View File

@ -36,7 +36,7 @@
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$gtmItemPriceObject->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$gtmItemPriceObject->getPrice()}],[{/oxhasrights}]
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': [{$basketitem->getAmount()}],
'position': [{$smarty.foreach.gtmCartContents.index}]

View File

@ -37,7 +37,7 @@
{
'item_id': '[{$oGtmProduct->getFieldData('oxartnum')}]',
'item_name': '[{$oGtmProduct->getFieldData('oxtitle')}]',
'price': [{$d3PriceObject->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3PriceObject->getPrice()}],[{/oxhasrights}]
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
'item_variant': '[{if $oGtmProduct->getFieldData('oxvarselect')}][{$oGtmProduct->getFieldData('oxvarselect')}][{/if}]',
[{if $gtmCategory}]

View File

@ -35,7 +35,7 @@
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$d3oItemPrice->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': [{$basketitem->getAmount()}],
'position': [{$smarty.foreach.gtmCartContents.index}]

View File

@ -40,7 +40,7 @@
'item_category_4': '[{$gtmPurchaseItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmPurchaseItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$gtmPurchaseItemPriceObject->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$gtmPurchaseItemPriceObject->getPrice()}],[{/oxhasrights}]
'quantity': [{$gtmBasketItem->getFieldData("oxamount")}],
'position': [{$smarty.foreach.gtmArticles.iteration}]
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]

View File

@ -28,7 +28,7 @@
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$d3oItemPrice->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': '[{$rmItem->getFieldData('d3AmountThatGotRemoved')}]',
'position': [{$smarty.foreach.gtmRemovedItems.index}]

View File

@ -33,7 +33,7 @@
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$d3oItemPrice->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3oItemPrice->getPrice()}],[{/oxhasrights}]
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': [{$basketitem->getAmount()}],
'position': [{$smarty.foreach.gtmCartContents.index}]

View File

@ -28,7 +28,7 @@
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
[{/if}]
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
'price': [{$d3PriceObject->getPrice()}]
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3PriceObject->getPrice()}][{/oxhasrights}]
}
]
}[{if $oViewConf->isDebugModeOn()}],

View File

@ -22,7 +22,7 @@
{
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
'price': [{$d3PriceObject->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3PriceObject->getPrice()}],[{/oxhasrights}]
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
[{if $gtmCategory}]
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',

View File

@ -18,7 +18,7 @@
{
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
'price': [{$d3PriceObject->getPrice()}],
[{oxhasrights ident="SHOWARTICLEPRICE"}]'price': [{$d3PriceObject->getPrice()}],[{/oxhasrights}]
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
[{if $gtmCategory}]
'item_category': '[{$gtmCategory->getSplitCategoryArray(0, true)}]',
@ -41,4 +41,4 @@
[{/if}]
[{/block}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]

View File

@ -8,7 +8,7 @@
<p class="alert alert-info">[{oxmultilang ident="WISH_LIST_EMPTY"}]</p>
[{/if}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
[{insert name="oxid_tracker" title=$template_title}]
[{/capture}]

View File

@ -21,7 +21,7 @@
[{/if}]
[{/block}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
[{insert name="oxid_tracker" title=$template_title}]
[{/capture}]

View File

@ -34,7 +34,7 @@
</p>
[{/if}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
[{insert name="oxid_tracker" title=$template_title}]
[{/capture}]