Erweiterung verschieben
This commit is contained in:
parent
2a1f8f5794
commit
bc1dafbbfa
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Core;
|
|||||||
|
|
||||||
use OxidEsales\EshopCommunity\Core\Registry;
|
use OxidEsales\EshopCommunity\Core\Registry;
|
||||||
|
|
||||||
class ShopControl extends ShopControl_parent{
|
class WidgetControl extends WidgetControl_parent{
|
||||||
protected function _getStartController() // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
protected function _getStartController() // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -27,33 +27,20 @@ class ShopControl extends ShopControl_parent{
|
|||||||
)
|
)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$sScriptName = $_SERVER['SCRIPT_NAME'];
|
||||||
|
if($sScriptName != '/widget.php')
|
||||||
|
{
|
||||||
|
return parent::getFrontendStartControllerKey();
|
||||||
|
}
|
||||||
|
|
||||||
$aParameter = $_GET;
|
$aParameter = $_GET;
|
||||||
if( is_null($aParameter['actcontrol'])
|
if(is_null($aParameter['actcontrol'])
|
||||||
&& is_null($aParameter['actcontrol'])
|
|
||||||
&& is_null($aParameter['actcontrol'])
|
&& is_null($aParameter['actcontrol'])
|
||||||
|
&& is_null($aParameter['oxwparent'])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 'D3\GoogleAnalytics4\Application\Component\Widget\d3GtmStartWidget';
|
return 'D3\GoogleAnalytics4\Application\Component\Widget\d3GtmStartWidget';
|
||||||
}
|
}
|
||||||
|
return parent::getFrontendStartControllerKey();
|
||||||
return $this->getStartControllerKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getStartControllerKey()
|
|
||||||
{
|
|
||||||
$controllerKey = Registry::getConfig()->getRequestControllerId();
|
|
||||||
|
|
||||||
// Use default route in case no controller id is given
|
|
||||||
if (!$controllerKey) {
|
|
||||||
$session = \OxidEsales\Eshop\Core\Registry::getSession();
|
|
||||||
if ($this->isAdmin()) {
|
|
||||||
$controllerKey = $session->getVariable("auth") ? 'admin_start' : 'login';
|
|
||||||
} else {
|
|
||||||
$controllerKey = $this->getFrontendStartControllerKey();
|
|
||||||
}
|
|
||||||
$session->setVariable('cl', $controllerKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $controllerKey;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -60,7 +60,7 @@ $aModule = [
|
|||||||
'extend' => [
|
'extend' => [
|
||||||
// Core
|
// Core
|
||||||
OEViewConfig::class => ViewConfig::class,
|
OEViewConfig::class => ViewConfig::class,
|
||||||
\OxidEsales\Eshop\Core\ShopControl::class => \D3\GoogleAnalytics4\Modules\Core\ShopControl::class,
|
\OxidEsales\Eshop\Core\WidgetControl::class => \D3\GoogleAnalytics4\Modules\Core\WidgetControl::class,
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
OECategory::class => Category::class,
|
OECategory::class => Category::class,
|
||||||
|
Loading…
Reference in New Issue
Block a user