8
0

Merge remote-tracking branch 'remotes/origin/dev_2.x_d3GtmStartController' into rel_2.x

Dieser Commit ist enthalten in:
MaxBuhe01 2024-09-19 15:33:02 +02:00
Commit 2a27b25c5a
3 geänderte Dateien mit 60 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Component\Widget;
class d3GtmStartWidget extends \OxidEsales\Eshop\Application\Component\Widget\WidgetController
{
public function render()
{
parent::render();
return '';
}
}

Datei anzeigen

@ -0,0 +1,43 @@
<?php
namespace D3\GoogleAnalytics4\Modules\Core;
use OxidEsales\EshopCommunity\Core\Registry;
class WidgetControl extends WidgetControl_parent{
protected function getFrontendStartControllerKey() // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
{
/*
* array (
'force_sid' => '2pistlaubiq58qtg3moudei0la',
'lang' => '0',
'actcontrol' => 'details',
'anid' => '064471',
'cl' => 'oxwarticledetails',
'cnid' => '159dd0f2fb2bd6e24ace53a0f1913797',
'listtype' => 'list',
'nocookie' => '1',
'oxwparent' => 'details',
'sid' => '2pistlaubiq58qtg3moudei0la',
'stoken' => 'A22D0F9E',
'varselid' =>
array (
0 => 'b842982bf522aa839bd88221f562fce8',
),
)
*/
$sScriptName = $_SERVER['SCRIPT_NAME'];
if($sScriptName !== '/widget.php')
{
return parent::getFrontendStartControllerKey();
}
$aParameter = $_GET;
if(is_null($aParameter['actcontrol']) and is_null($aParameter['oxwparent']))
{
return 'D3\GoogleAnalytics4\Application\Component\Widget\d3GtmStartWidget';
}
return parent::getFrontendStartControllerKey();
}
}

Datei anzeigen

@ -61,7 +61,8 @@ $aModule = [
],
'extend' => [
// Core
OEViewConfig::class => ViewConfig::class,
OEViewConfig::class => ViewConfig::class,
\OxidEsales\Eshop\Core\WidgetControl::class => \D3\GoogleAnalytics4\Modules\Core\WidgetControl::class,
// Model
OECategory::class => Category::class,