Vergelijk commits

..

17 Commits

Auteur SHA1 Bericht Datum
8097ed01c6 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2024-09-19 16:29:08 +02:00
96e5adbece Merge remote-tracking branch 'remotes/origin/rel_2.x' 2024-08-10 13:56:00 +02:00
8a643a0b8a Merge remote-tracking branch 'remotes/origin/rel_2.x' 2024-03-08 10:10:27 +01:00
7d23204841 Merge remote-tracking branch 'remotes/origin/rel_1.x' 2024-03-08 09:49:12 +01:00
c7d3671265 [Bump] Changelog && Metadata 2024-01-25 14:50:44 +01:00
3621ca606a [Fix] missing Component-ArticleDetails extension; missing ManufacturerList-Extension 2024-01-25 14:49:32 +01:00
e3f4bd16c9 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2024-01-03 13:49:08 +01:00
42618fef79 Merge remote-tracking branch 'remotes/origin/rel_2.x'
# Conflicts:
#	Modules/Core/ViewConfig.php
2023-09-13 16:18:43 +02:00
f02c40cfb7 Merge remote-tracking branch 'remotes/origin/rel_1.x'
# Conflicts:
#	Application/views/admin/de/module_options.php
#	Application/views/ga4/view_item_list.tpl
#	CHANGELOG.md
#	Docs/README.md
#	IntelliSenseHelper.php
#	Modules/Core/ViewConfig.php
#	metadata.php
2023-09-13 16:13:03 +02:00
154147b8d8 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-09-07 15:22:13 +02:00
43cdc7e8ae Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-08-02 11:57:26 +02:00
461f7f15da Merge remote-tracking branch 'remotes/origin/rel_1.x'
# Conflicts:
#	Application/views/admin/de/module_options.php
#	Application/views/ga4/view_item_list.tpl
#	CHANGELOG.md
#	Modules/Core/ViewConfig.php
#	composer.json
#	metadata.php
2023-06-27 10:03:51 +02:00
4f8fa7cdc9 Merge remote-tracking branch 'remotes/origin/rel_2.x'
# Conflicts:
#	CHANGELOG.md
2023-06-27 09:59:00 +02:00
7266416fe4 Merge remote-tracking branch 'remotes/origin/rel_2.x'
# Conflicts:
#	metadata.php
2023-06-19 15:25:00 +02:00
389d4f44ed Merge remote-tracking branch 'remotes/origin/rel_1.x'
# Conflicts:
#	CHANGELOG.md
#	metadata.php
2023-06-19 15:23:42 +02:00
41d6e94fa7 Merge remote-tracking branch 'remotes/origin/rel_2.x' 2023-05-31 14:55:26 +02:00
b8e2aeaa58 Merge remote-tracking branch 'remotes/origin/rel_1.x'
# Conflicts:
#	Application/views/admin/de/module_options.php
#	Application/views/ga4/view_item_list.tpl
#	CHANGELOG.md
#	Modules/Core/ViewConfig.php
#	metadata.php
2023-05-31 14:51:07 +02:00
77 gewijzigde bestanden met toevoegingen van 289 en 386 verwijderingen

Bestand weergeven

@ -1,15 +1,13 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP81Migration' => true,
'@PSR12' => true,
'php_unit_test_class_requires_covers' => true,
'doctrine_annotation_indentation' => true,
])
->setFinder($finder)
;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP73Migration' => true,
'@PSR12' => true
])
->setFinder($finder)
;

Bestand weergeven

@ -12,4 +12,4 @@ class d3GtmStartWidget extends \OxidEsales\Eshop\Application\Component\Widget\Wi
return '';
}
}
}

Bestand weergeven

@ -12,7 +12,7 @@ use OxidEsales\Eshop\Core\ViewConfig;
class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController
{
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uimain';
protected $_sThisTemplate = 'ga4/admin/d3ga4uimain.tpl';
public function render()
{
@ -41,10 +41,10 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
'_blEnableUsercentricsConsentModeApi',
];
foreach ($aCheckBoxParams as $checkBoxName) {
if (isset($aParams['bool'][$checkBoxName])) {
foreach ($aCheckBoxParams as $checkBoxName){
if (isset($aParams['bool'][$checkBoxName])){
$aParams['bool'][$checkBoxName] = true;
} else {
}else{
$aParams['bool'][$checkBoxName] = false;
}
}
@ -60,8 +60,8 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
{
$oConfig = Registry::getConfig();
foreach ($aParams as $sConfigType => $aConfigParams) {
foreach ($aConfigParams as $sParamName => $sParamValue) {
if ($this->d3GetModuleConfigParam($sParamName) !== $sParamValue) {
foreach ($aConfigParams as $sParamName => $sParamValue){
if($this->d3GetModuleConfigParam($sParamName) !== $sParamValue){
$oConfig->saveShopConfVar(
$sConfigType,
Constants::OXID_MODULE_ID.$sParamName,
@ -82,4 +82,4 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
{
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam($configParamName);
}
}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Model\CMP;
abstract class ConsentManagementPlatformBaseModel extends \OxidEsales\Eshop\Core\Model\BaseModel implements ConsentManagementPlatformInterface
{
public string $sCMPName;
@ -15,4 +16,4 @@ abstract class ConsentManagementPlatformBaseModel extends \OxidEsales\Eshop\Core
{
return $this->sCMPName;
}
}
}

Bestand weergeven

@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Application\Model\CMP;
interface ConsentManagementPlatformInterface
{
public function getCMPName();
}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Model\CMP;
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
/**
@ -17,8 +18,8 @@ use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
*/
class Usercentrics extends ConsentManagementPlatformBaseModel
{
public const sExternalIncludationPublicName = "( Externe Einbindung ) Usercentrics";
public const sExternalIncludationInternalName = "usercentrics";
public const sModuleIncludationPublicName = "( Modul ) Usercentrics";
public const sModuleIncludationInternalName = "oxps_usercentrics";
}
const sExternalIncludationPublicName = "( Externe Einbindung ) Usercentrics";
const sExternalIncludationInternalName = "usercentrics";
const sModuleIncludationPublicName = "( Modul ) Usercentrics";
const sModuleIncludationInternalName = "oxps_usercentrics";
}

Bestand weergeven

@ -4,7 +4,8 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'd3googleanalytics4';
}
}

Bestand weergeven

@ -12,25 +12,25 @@ class ManagerHandler
*
* @return string
*/
public function getCurrManager(): string
public function getCurrManager() :string
{
/** @var ManagerTypes $oManagerTypes */
$oManagerTypes = oxNew(ManagerTypes::class);
/** @var ViewConfig|\D3\GoogleAnalytics4\Modules\Core\ViewConfig $oViewConfig */
/** @var ViewConfig $oViewConfig */
$oViewConfig = oxNew(ViewConfig::class);
$aManagerList = $oManagerTypes->getManagerList();
if ($this->getModuleSettingExplicitManagerSelectValue()) {
if ($this->getModuleSettingExplicitManagerSelectValue()){
return $this->getExplicitManager();
}
foreach ($aManagerList as $shopModuleId => $publicCMPName) {
if ($oViewConfig->d3IsModuleActive($shopModuleId)) {
$this->d3SaveShopConfVar($shopModuleId);
return $shopModuleId;
}
foreach ($aManagerList as $shopModuleId => $publicCMPName){
if ($oViewConfig->isModuleActive($shopModuleId)){
$this->d3SaveShopConfVar($shopModuleId);
return $shopModuleId;
}
}
return "";
@ -40,8 +40,7 @@ class ManagerHandler
* @param string $sParam
* @return void
*/
public function d3SaveShopConfVar(string $sParam)
{
public function d3SaveShopConfVar(string $sParam){
Registry::getConfig()->saveShopConfVar(
'select',
Constants::OXID_MODULE_ID."_HAS_STD_MANAGER",
@ -54,15 +53,15 @@ class ManagerHandler
/**
* @return string
*/
public function getModuleSettingExplicitManagerSelectValue(): string
public function getModuleSettingExplicitManagerSelectValue() :string
{
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam('_HAS_STD_MANAGER') ?: "";
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam('_HAS_STD_MANAGER')?:"";
}
/**
* @return string
*/
public function getExplicitManager(): string
public function getExplicitManager() :string
{
$sPotentialManagerName = $this->getModuleSettingExplicitManagerSelectValue();
@ -76,4 +75,4 @@ class ManagerHandler
return $sCMPName;
}
}
}

Bestand weergeven

@ -6,26 +6,20 @@ use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
class ManagerTypes
{
public const EXTERNAL_SERVICE = "eigener Service";
public const INTERNAL_EXTERNAL_SERVICE = "externalService";
public const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
public const INTERNAL_NET_COOKIE_MANAGER = "net_cookie_manager";
const EXTERNAL_SERVICE = "eigener Service";
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
/**
* Further information's:
* https://github.com/aggrosoft/oxid-cookie-compliance
*/
public const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
public const INTERNAL_AGCOOKIECOMPLIANCE = "agcookiecompliance";
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
public const CONSENTMANAGER = "Consentmanager";
public const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
const CONSENTMANAGER = "Consentmanager";
public const COOKIEFIRST = "Cookiefirst";
public const INTERNAL_COOKIEFIRST = "cookiefirst";
const COOKIEFIRST = "Cookiefirst";
public const COOKIEBOT = "Cookiebot";
public const INTERNAL_COOKIEBOT = "cookiebot";
const COOKIEBOT = "Cookiebot";
/**
* @return array
@ -33,14 +27,14 @@ class ManagerTypes
public function getManagerList(): array
{
return [
self::INTERNAL_EXTERNAL_SERVICE => self::EXTERNAL_SERVICE,
self::INTERNAL_AGCOOKIECOMPLIANCE => self::AGCOOKIECOMPLIANCE,
self::INTERNAL_NET_COOKIE_MANAGER => self::NET_COOKIE_MANAGER,
"externalService" => self::EXTERNAL_SERVICE,
"agcookiecompliance" => self::AGCOOKIECOMPLIANCE,
"net_cookie_manager" => self::NET_COOKIE_MANAGER,
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
self::INTERNAL_CONSENTMANAGER => self::CONSENTMANAGER,
self::INTERNAL_COOKIEFIRST => self::COOKIEFIRST,
self::INTERNAL_COOKIEBOT => self::COOKIEBOT,
"cmconsentmanager" => self::CONSENTMANAGER,
"cookiefirst" => self::COOKIEFIRST,
"cookiebot" => self::COOKIEBOT,
];
}
@ -48,25 +42,8 @@ class ManagerTypes
* @param string $sManager
* @return bool
*/
public function isManagerInList(string $sManager): bool
public function isManagerInList(string $sManager) :bool
{
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,
];
}
}
}

Bestand weergeven

@ -1,10 +1,9 @@
<?php
$sLangName = "Deutsch";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = [
$aLang = array(
'charset' => 'UTF-8',
'd3mxgoogleanalytics4' => 'Google Analytics 4',
@ -121,4 +120,4 @@ Nachher:
src="{Domain}?id={Container-ID}"
</code>
</pre>',
];
);

Bestand weergeven

@ -1,5 +1,4 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

Bestand weergeven

@ -1,4 +1,4 @@
[{include file="@d3googleanalytics4/admin/d3ga4uiheaditem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
[{include file="ga4/admin/d3ga4uiheaditem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<style>
body {
background-image: linear-gradient(to top, #d5d4d0 0%, #d5d4d0 1%, #eeeeec 31%, #efeeec 75%, #e9e9e7 100%);
@ -80,6 +80,7 @@
[{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}]

Bestand weergeven

@ -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}]

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

@ -41,4 +41,4 @@
[{/if}]
[{/block}]
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

@ -6,17 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.17.2...rel_2.x) - 2024-x
## [3.0.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.22.0...3.0.0.0) - 2024-11-25
### Added
- installability OXID 7
- don't submit item prices, if user doesn't have "show price" right
## [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
- missing parameters for widget.php call

Bestand weergeven

@ -14,28 +14,18 @@
*/
namespace D3\GoogleAnalytics4\Modules\Core{
class ViewConfig_parent extends \OxidEsales\Eshop\Core\ViewConfig
{
}
class ViewConfig_parent extends \OxidEsales\Eshop\Core\ViewConfig{}
}
namespace D3\GoogleAnalytics4\Modules\Application\Model{
use OxidEsales\Eshop\Application\Model\Payment;
class Category_parent extends \OxidEsales\Eshop\Application\Model\Category
{
}
class Basket_parent extends \OxidEsales\Eshop\Application\Model\Basket
{
}
class Manufacturer_parent extends \OxidEsales\Eshop\Application\Model\Manufacturer
{
}
class Category_parent extends \OxidEsales\Eshop\Application\Model\Category {}
class Basket_parent extends \OxidEsales\Eshop\Application\Model\Basket {}
class Manufacturer_parent extends \OxidEsales\Eshop\Application\Model\Manufacturer {}
class gtmPayment_parent extends Payment
{
}
class gtmPayment_parent extends Payment {}
}
namespace D3\GoogleAnalytics4\Modules\Application\Controller{
@ -48,60 +38,36 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller{
use OxidEsales\Eshop\Application\Controller\SearchController;
use OxidEsales\Eshop\Application\Controller\StartController;
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController
{
}
class ThankYouController_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController
{
}
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController {}
class ThankYouController_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
class ArticleListController_AddToCartHelpMethods_parent extends ArticleListController
{
}
class ArticleListController_AddToCartHelpMethods_parent extends ArticleListController {}
class ArticleDetailsController_parent extends \OxidEsales\Eshop\Application\Controller\ArticleDetailsController
{
}
class ArticleDetailsController_parent extends \OxidEsales\Eshop\Application\Controller\ArticleDetailsController {}
class d3GtmAccountNoticeListController_parent extends AccountNoticeListController
{
}
class d3GtmAccountNoticeListController_parent extends AccountNoticeListController {}
class d3GtmAccountRecommlistController_parent extends AccountRecommlistController
{
}
class d3GtmAccountRecommlistController_parent extends AccountRecommlistController {}
class d3GtmAccountWishlistController_parent extends AccountWishlistController
{
}
class d3GtmAccountWishlistController_parent extends AccountWishlistController {}
class d3GtmStartController_parent extends StartController
{
}
class d3GtmStartController_parent extends StartController {}
class d3GtmSearchController_parent extends SearchController
{
}
class d3GtmSearchController_parent extends SearchController {}
class d3GtmManufacturerListController_parent extends ManufacturerController
{
}
class d3GtmManufacturerListController_parent extends ManufacturerController {}
}
namespace D3\GoogleAnalytics4\Modules\Application\Component{
use OxidEsales\Eshop\Application\Component\BasketComponent;
class d3GtmBasketComponentExtension_parent extends BasketComponent
{
}
class d3GtmBasketComponentExtension_parent extends BasketComponent {}
}
namespace D3\GoogleAnalytics4\Modules\Application\Component\Widget{
use OxidEsales\Eshop\Application\Component\Widget\ArticleDetails;
class d3GtmWidgetArticleDetails_parent extends ArticleDetails
{
}
}
class d3GtmWidgetArticleDetails_parent extends ArticleDetails {}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Component\Widget;
class d3GtmWidgetArticleDetails extends d3GtmWidgetArticleDetails_parent
{
public function render()
@ -14,4 +15,4 @@ class d3GtmWidgetArticleDetails extends d3GtmWidgetArticleDetails_parent
return $return;
}
}
}

Bestand weergeven

@ -24,9 +24,9 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
$iAmountArticlesAddedToCart = (int) Registry::getRequest()->getRequestEscapedParameter('am');
if ($iAmountArticlesAddedToCart) {
if ($iAmountArticlesAddedToCart){
Registry::getSession()->setVariable('d3GtmAddToCartAmountArticles', $iAmountArticlesAddedToCart);
} else {
}else{
Registry::getSession()->setVariable('d3GtmAddToCartAmountArticles', 1);
}
@ -36,7 +36,7 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
/**
* @return int
*/
public function getD3GtmAddToCartAmountArticles(): int
public function getD3GtmAddToCartAmountArticles() :int
{
$iAmount = Registry::getSession()->getVariable('d3GtmAddToCartAmountArticles');
@ -48,7 +48,7 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
/**
* @return bool
*/
public function getAddToBasketDecision(): bool
public function getAddToBasketDecision() :bool
{
$decision = Registry::getSession()->getVariable('d3GtmAddToBasketTrigger');
@ -66,7 +66,7 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
$oArticle = null;
if ($sAnid) {
if ($sAnid){
/** @var Article $oArticle */
$oArticle = oxNew(Article::class);
$oArticle->load($sAnid);
@ -74,4 +74,4 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
return $oArticle;
}
}
}

Bestand weergeven

@ -12,4 +12,4 @@ class ArticleDetailsController extends ArticleDetailsController_parent
return $return;
}
}
}

Bestand weergeven

@ -12,4 +12,4 @@ class ArticleListController_AddToCartHelpMethods extends ArticleListController_A
return $render;
}
}
}

Bestand weergeven

@ -26,7 +26,7 @@ class BasketController extends BasketController_parent
* @return void
* @throws oxSystemComponentException
*/
public function d3GA4getRemovedArticlesListObject(): void
public function d3GA4getRemovedArticlesListObject() :void
{
$this->addTplParam('hasBeenReloaded', false);
// collecting items to add
@ -52,7 +52,7 @@ class BasketController extends BasketController_parent
'am' => $dAmount,
'sel' => $aSel,
'persparam' => $aPersParam,
'basketitemid' => $sBasketItemId,
'basketitemid' => $sBasketItemId
];
}
@ -84,9 +84,9 @@ class BasketController extends BasketController_parent
#dumpVar($this->getBasketArticles());
/** @var Article $item */
foreach ($oArtList->getArray() as $item) {
foreach ($artIdOnArtAmountList as $artId => $artAmount) {
if ($item->getId() === $artId) {
foreach ($oArtList->getArray() as $item){
foreach ($artIdOnArtAmountList as $artId => $artAmount){
if ($item->getId() === $artId){
$item->assign(['d3AmountThatGotRemoved' => $artAmount]);
}
}
@ -104,13 +104,13 @@ class BasketController extends BasketController_parent
* if that doesn't work, we check if there's an Article in the Products array, that has "'am' = 0"
* Which also shows we're in that state rn
*/
protected function isArticleRemovedState(array $productsArray): bool
protected function isArticleRemovedState(array $productsArray) :bool
{
if (Registry::getRequest()->getRequestEscapedParameter('removeBtn')
or Registry::getRequest()->getRequestEscapedParameter('updateBtn')
) {
){
return true;
} else {
}else{
foreach ($productsArray as $aProduct) {
if (intval($aProduct['am']) === 0) {
return true;

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
class d3GtmManufacturerListController extends d3GtmManufacturerListController_parent
{
public function render()
@ -14,4 +15,4 @@ class d3GtmManufacturerListController extends d3GtmManufacturerListController_pa
return $return;
}
}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
class d3GtmSearchController extends d3GtmSearchController_parent
{
/**
@ -13,10 +14,10 @@ class d3GtmSearchController extends d3GtmSearchController_parent
{
$return = parent::render();
if (false === in_array('oxcmp_basket', $this->getComponents())) {
if (false === in_array('oxcmp_basket', $this->getComponents())){
$this->addTplParam('d3CmpBasket', $this->getComponent('oxcmp_basket'));
}
return $return;
}
}
}

Bestand weergeven

@ -10,10 +10,10 @@ class d3GtmStartController extends d3GtmStartController_parent
{
$return = parent::render();
if (false === in_array('oxcmp_basket', $this->getComponents())) {
if (false === in_array('oxcmp_basket', $this->getComponents())){
$this->addTplParam('d3CmpBasket', $this->getComponent('oxcmp_basket'));
}
return $return;
}
}
}

Bestand weergeven

@ -9,15 +9,15 @@ class Basket extends Basket_parent
/**
* @return string
*/
public function getPaymentOnPaymentId(): string
public function getPaymentOnPaymentId() :string
{
if ($this->getPaymentId()) {
if ($this->getPaymentId()){
$oPayment = oxNew(Payment::class);
if ($oPayment->load($this->getPaymentId())) {
if ($oPayment->load($this->getPaymentId())){
return $oPayment->getFieldData('oxdesc');
}
}
return "couldn't load payment!";
}
}
}

Bestand weergeven

@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Category extends Category_parent
{
use articleTreeStructure;
}
}

Bestand weergeven

@ -5,4 +5,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Manufacturer extends Manufacturer_parent
{
use articleTreeStructure;
}
}

Bestand weergeven

@ -4,7 +4,8 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Model;
class Vendor extends \OxidEsales\Eshop\Application\Model\Vendor
{
use articleTreeStructure;
}
}

Bestand weergeven

@ -8,9 +8,9 @@ trait articleTreeStructure
* @param int $indexOfArray
* @return string
*/
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false): string
public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string
{
if ($bShallTakeStd) {
if ($bShallTakeStd){
$splitCatArray =
array_values(
array_filter(
@ -26,9 +26,9 @@ trait articleTreeStructure
)
);
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))) {
if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){
return $splitCatArray[$indexOfArray];
} else {
}else{
return "";
}
}
@ -41,4 +41,4 @@ trait articleTreeStructure
)
);
}
}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Model;
use OxidEsales\Eshop\Application\Model\Payment;
use OxidEsales\Eshop\Core\Registry;
@ -12,8 +13,8 @@ class gtmPayment extends gtmPayment_parent
/**
* @return string
*/
public function gtmGetSelectedPaymentName(): string
public function gtmGetSelectedPaymentName() :string
{
return $this->getFieldData('oxpayments__oxdesc') ?: 'No payment name available';
return $this->getFieldData('oxpayments__oxdesc')?: 'No payment name available';
}
}
}

Bestand weergeven

@ -1,5 +1,4 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@ -18,17 +17,17 @@ use D3\GoogleAnalytics4\Application\Model\Constants;
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\Config;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Exception\ModuleConfigurationNotFoundException;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Setup\Bridge\ModuleActivationBridgeInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class ViewConfig extends ViewConfig_parent
{
// Google Tag Manager Container ID
private $sContainerId = null;
@ -40,7 +39,8 @@ class ViewConfig extends ViewConfig_parent
public function getGtmContainerId()
{
if ($this->sContainerId === null) {
if ($this->sContainerId === null)
{
$this->sContainerId = $this->d3GetModuleConfigParam("_sContainerID");
}
return $this->sContainerId;
@ -49,19 +49,19 @@ class ViewConfig extends ViewConfig_parent
/**
* @return void
*/
public function defineCookieManagerType(): void
public function defineCookieManagerType() :void
{
if ($this->sCookieManagerType === null) {
if ($this->sCookieManagerType === null)
{
/** @var ManagerHandler $oManagerHandler */
$oManagerHandler = oxNew(ManagerHandler::class);
$this->sCookieManagerType = $oManagerHandler->getCurrManager();
}
}
/**
* @return bool
*/
public function shallUseOwnCookieManager(): bool
public function shallUseOwnCookieManager() :bool
{
return (bool) $this->d3GetModuleConfigParam('_blEnableOwnCookieManager');
}
@ -74,7 +74,7 @@ class ViewConfig extends ViewConfig_parent
/** @var Config $oConfig */
$oConfig = Registry::getConfig();
if (false === $this->isGA4enabled()) {
if (false === $this->isGA4enabled()){
return false;
}
@ -88,7 +88,7 @@ class ViewConfig extends ViewConfig_parent
$sCookieID = trim($this->d3GetModuleConfigParam('_sControlParameter'));
// Netensio Cookie Manager
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_NET_COOKIE_MANAGER) {
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
$oSession = Registry::getSession();
$aCookies = $oSession->getVariable("aCookieSel");
@ -96,23 +96,26 @@ class ViewConfig extends ViewConfig_parent
}
// Aggrosoft Cookie Consent
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_AGCOOKIECOMPLIANCE) {
if ($this->sCookieManagerType === ManagerTypes::AGCOOKIECOMPLIANCE) {
if (method_exists($this, "isCookieCategoryEnabled")) {
return $this->isCookieCategoryEnabled($sCookieID);
}
}
// UserCentrics or consentmanager
if (
in_array(
$this->sCookieManagerType,
(oxNew(ManagerTypes::class)->scriptTagDeliveredByDefaultArray())
)
) {
$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
)
{
// Always needs the script-tags delivered to the DOM.
return true;
}
// Cookie Manager not (yet) supported
return false;
}
@ -121,30 +124,32 @@ class ViewConfig extends ViewConfig_parent
* This is especially important for UserCentrics.
* @return string
*/
public function getGtmScriptAttributes(): string
public function getGtmScriptAttributes() :string
{
$sControlParameter = trim($this->d3GetModuleConfigParam('_sControlParameter'));
if (false === $this->shallUseOwnCookieManager() or ($sControlParameter === '')) {
if (false === $this->shallUseOwnCookieManager() or ($sControlParameter === '')){
return "";
}
if (
$this->sCookieManagerType === Usercentrics::sModuleIncludationInternalName
or $this->sCookieManagerType === Usercentrics::sExternalIncludationInternalName
) {
)
{
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
}
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_CONSENTMANAGER) {
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
{
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
}
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEFIRST) {
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
}
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEBOT) {
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
}
@ -157,23 +162,22 @@ class ViewConfig extends ViewConfig_parent
*/
public function isGA4enabled()
{
if ($this->blGA4enabled === null) {
if ($this->blGA4enabled === null)
{
$this->blGA4enabled = $this->d3GetModuleConfigParam("_blEnableGA4");
}
return $this->blGA4enabled;
}
public function isGtmConsentModeSetActivated(): bool
public function isGtmConsentModeSetActivated() :bool
{
return $this->d3GetModuleConfigParam("_blEnableConsentMode") ?: false;
return $this->d3GetModuleConfigParam("_blEnableConsentMode")?: false;
}
public function getGtmDataLayer()
{
if (!$this->getGtmContainerId()) {
return "[]";
}
if (!$this->getGtmContainerId()) return "[]";
$oConfig = Registry::getConfig();
$oView = $oConfig->getTopActiveView();
@ -208,9 +212,9 @@ class ViewConfig extends ViewConfig_parent
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
}
public function isDebugModeOn(): bool
public function isDebugModeOn() :bool
{
return $this->d3GetModuleConfigParam("_blEnableDebug") ?: false;
return $this->d3GetModuleConfigParam("_blEnableDebug")?: false;
}
/**
@ -218,9 +222,9 @@ class ViewConfig extends ViewConfig_parent
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getServerSidetaggingJsDomain(): string
public function getServerSidetaggingJsDomain() :string
{
return $this->d3GetModuleConfigParam("_sServersidetagging_js") ?: "";
return $this->d3GetModuleConfigParam("_sServersidetagging_js")?: "";
}
/**
@ -228,9 +232,9 @@ class ViewConfig extends ViewConfig_parent
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getServerSidetaggingNoJsDomain(): string
public function getServerSidetaggingNoJsDomain() :string
{
return $this->d3GetModuleConfigParam('_sServersidetagging_nojs') ?: "";
return $this->d3GetModuleConfigParam('_sServersidetagging_nojs')?: "";
}
/**
@ -245,7 +249,7 @@ class ViewConfig extends ViewConfig_parent
/**
* @return bool
*/
public function d3IsUsercentricsCMPChosen(): bool
public function d3IsUsercentricsCMPChosen() :bool
{
$sCMPPubName = $this->d3GetModuleConfigParam('_HAS_STD_MANAGER');
$aPossibleCMP = (oxNew(ManagerTypes::class))->getManagerList();
@ -253,26 +257,4 @@ 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;
}
}
}

Bestand weergeven

@ -4,8 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Core;
use OxidEsales\EshopCommunity\Core\Registry;
class WidgetControl extends WidgetControl_parent
{
class WidgetControl extends WidgetControl_parent{
protected function getFrontendStartControllerKey() // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
{
/*
@ -28,15 +27,17 @@ class WidgetControl extends WidgetControl_parent
)
*/
$sScriptName = $_SERVER['SCRIPT_NAME'];
if ($sScriptName !== '/widget.php') {
if($sScriptName !== '/widget.php')
{
return parent::getFrontendStartControllerKey();
}
$aParameter = $_GET;
if (is_null($aParameter['actcontrol']) and is_null($aParameter['oxwparent'])) {
if(is_null($aParameter['actcontrol']) and is_null($aParameter['oxwparent']))
{
return 'D3\GoogleAnalytics4\Application\Component\Widget\d3GtmStartWidget';
}
return parent::getFrontendStartControllerKey();
}
}
}

Bestand weergeven

@ -23,21 +23,11 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
Öffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). Führen Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
```bash
php composer require d3/google-analytics4:^3
php composer require d3/google-analytics4:^2
```
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
```bash
./vendor/bin/oe-console oe:module:deactivate d3googleanalytics4
./vendor/bin/oe-console oe:module:install ./vendor/d3/google-analytics4/
./vendor/bin/oe-console oe:module:activate d3googleanalytics4
./vendor/bin/oe-eshop-db_views_generate
```
Leeren Sie anschließend den Temp Ordner des Shops.
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
### Wichtig!

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Setup;
use D3\GoogleAnalytics4\Application\Model\Constants;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\ViewConfig;
@ -16,11 +17,10 @@ class Actions
* @param string $sSettingValue
* @return void
*/
public function d3SaveDefaultSettings(string $sVarType, string $sSettingName, string $sSettingValue)
{
public function d3SaveDefaultSettings(string $sVarType, string $sSettingName, string $sSettingValue){
$oConfig = Registry::getConfig();
if ($this->d3GetModuleConfigParam($sSettingName) and (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue))) {
if ($this->d3GetModuleConfigParam($sSettingName) and (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue))){
$sSettingValue = trim($this->d3GetModuleConfigParam($sSettingName));
}
@ -41,4 +41,4 @@ class Actions
{
return Registry::getConfig()->getShopConfVar(Constants::OXID_MODULE_ID.$configParamName, null, Constants::OXID_MODULE_ID);
}
}
}

Bestand weergeven

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace D3\GoogleAnalytics4\Setup;
class Events
{
/**
@ -32,7 +33,5 @@ class Events
/**
* @return void
*/
public static function onDeactivate()
{
}
}
public static function onDeactivate(){}
}

Bestand weergeven

@ -28,25 +28,29 @@
"homepage": "https://www.d3data.de"
}
],
"supports": {
"support": {
"email": "support@shopmodule.com"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json",
".php-cs-fixer.php",
"*.neon"
],
"target-directory": "d3/googleanalytics4"
}
},
"require": {
"php": "^8.0",
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
"php": "7.1 - 8.2",
"oxid-esales/oxideshop-ce": "^6.5.3",
"google/apiclient":" ^2.0",
"phpstan/phpstan": "^1.10"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.9"
},
"autoload": {
"psr-4": {
"D3\\GoogleAnalytics4\\": ""
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
}
},
"scripts": {
"php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/google-analytics4/.php-cs-fixer.php",
"php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/google-analytics4/.php-cs-fixer.php"
}
}

Bestand weergeven

@ -52,12 +52,12 @@ $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' => '3.0.0.0',
'version' => '2.21.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
'controllers' => [
'd3googleanalytics4_main' => GA4AdminUserInterfaceMainController::class,
'd3googleanalytics4_main' => GA4AdminUserInterfaceMainController::class
],
'extend' => [
// Core
@ -88,109 +88,106 @@ $aModule = [
],
'templates' => [
// Event files that store the GA4 Event-Information
'@' . 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_cart.tpl' => 'views/smarty/event/view_cart.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',
'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',
// complete overwritten file of OXID-Originals
// the path of the template-name is the original path to the file in OXID-context from 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',
'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',
// Admin Templates
'@' . 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',
'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',
],
'blocks' => [
// tag manager js
[
'template' => 'layout/base.tpl',
'block' => 'head_meta_robots',
'file' => 'views/smarty/blocks/_gtm_js.tpl',
'position' => 150,
'file' => '/Application/views/blocks/_gtm_js.tpl',
'position' => 150
],
// tag manager nojs
[
'template' => 'layout/base.tpl',
'block' => 'theme_svg_icons',
'file' => 'views/smarty/blocks/_gtm_nojs.tpl',
'position' => 150,
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
],
// details
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_title',
'file' => 'views/smarty/blocks/view_item.tpl',
'position' => 150,
'file' => '/Application/views/blocks/view_item.tpl',
'position' => 150
],
// View Cart
[
'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main',
'file' => 'views/smarty/blocks/view_cart.tpl',
'position' => 150,
'file' => '/Application/views/blocks/view_cart.tpl'
],
// add_to_cart
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_tobasket',
'file' => 'views/smarty/blocks/details_productmain_tobasket.tpl',
'position' => 150,
'file' => '/Application/views/blocks/details_productmain_tobasket.tpl',
'position' => 150
],
// remove_from_cart
[
'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main',
'file' => 'views/smarty/blocks/remove_from_cart.tpl',
'position' => 150,
'file' => '/Application/views/blocks/remove_from_cart.tpl',
'position' => 150
],
[
'template' => 'page/checkout/thankyou.tpl',
'block' => 'checkout_thankyou_main',
'file' => 'views/smarty/blocks/purchase.tpl',
'position' => 150,
'file' => '/Application/views/blocks/purchase.tpl'
],
// Lists
// view_item_list
[
'template' => 'page/list/list.tpl',
'block' => 'page_list_productlist',
'file' => 'views/smarty/blocks/view_item_list.tpl',
'position' => 150,
'file' => '/Application/views/blocks/view_item_list.tpl',
'position' => 150
],
// view_search_result
[
'template' => 'page/search/search.tpl',
'block' => 'search_results',
'file' => 'views/smarty/blocks/view_search_result.tpl',
'position' => 150,
'file' => '/Application/views/blocks/view_search_result.tpl',
'position' => 150
],
[
'template' => 'page/list/list.tpl',
'block' => 'page_list_listbody',
'file' => 'views/smarty/blocks/page_list_listbody.tpl',
'position' => 150,
'file' => '/Application/views/blocks/page_list_listbody.tpl',
'position' => 150
],
[
'template' => 'page/shop/start.tpl',
'block' => 'start_welcome_text',
'file' => 'views/smarty/blocks/start_welcome_text.tpl',
'position' => 150,
'file' => '/Application/views/blocks/start_welcome_text.tpl',
'position' => 150
],
// Checkout process
// Begin CHeckout
[
'template' => 'page/checkout/user.tpl',
'block' => 'checkout_user_main',
'file' => 'views/smarty/blocks/begin_checkout.tpl',
'position' => 150,
'file' => '/Application/views/blocks/begin_checkout.tpl',
'position' => 150
],
// Add payment info
// We add it into checkout_order_main ( checkout/order.tpl ) to make sure a payment is actually added;
@ -198,12 +195,12 @@ $aModule = [
[
'template' => 'page/checkout/order.tpl',
'block' => 'checkout_order_main',
'file' => 'views/smarty/blocks/add_payment_info.tpl',
'position' => 150,
'file' => '/Application/views/blocks/add_payment_info.tpl',
'position' => 150
],
],
'events' => [
'onActivate' => '\D3\GoogleAnalytics4\Setup\Events::onActivate',
'onDeactivate' => '\D3\GoogleAnalytics4\Setup\Events::onDeactivate',
],
];
];

0
assets/thumbnail.png → thumbnail.png Normal file → Executable file
Bestand weergeven

Voor

Breedte:  |  Hoogte:  |  Grootte: 31 KiB

Na

Breedte:  |  Hoogte:  |  Grootte: 31 KiB

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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

Bestand weergeven

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