[Added] auto safe on first approach ga4 + cmp-mod
This commit is contained in:
parent
0dc5565640
commit
e500814e7e
@ -22,13 +22,30 @@ class ManagerHandler
|
|||||||
|
|
||||||
$aManagerList = $oManagerTypes->getManagerList();
|
$aManagerList = $oManagerTypes->getManagerList();
|
||||||
|
|
||||||
foreach ($aManagerList as $managerName){
|
if ($this->getModuleSettingExplicitManagerSelectValue()){
|
||||||
if ($oViewConfig->isModuleActive($managerName)){
|
return $this->getExplicitManager();
|
||||||
return $managerName;
|
}
|
||||||
|
|
||||||
|
foreach ($aManagerList as $shopModuleId => $publicCMPName){
|
||||||
|
if ($oViewConfig->isModuleActive($shopModuleId)){
|
||||||
|
$this->d3SaveShopConfVar($shopModuleId);
|
||||||
|
return $shopModuleId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getExplicitManager();
|
/**
|
||||||
|
* @param string $sParam
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function d3SaveShopConfVar(string $sParam){
|
||||||
|
Registry::getConfig()->saveShopConfVar(
|
||||||
|
'select',
|
||||||
|
Constants::OXID_MODULE_ID."_HAS_STD_MANAGER",
|
||||||
|
$sParam,
|
||||||
|
Registry::getConfig()->getShopId(),
|
||||||
|
Constants::OXID_MODULE_ID
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,8 +65,12 @@ class ManagerHandler
|
|||||||
|
|
||||||
/** @var ManagerTypes $oManagerTypes */
|
/** @var ManagerTypes $oManagerTypes */
|
||||||
$oManagerTypes = oxNew(ManagerTypes::class);
|
$oManagerTypes = oxNew(ManagerTypes::class);
|
||||||
return $oManagerTypes->isManagerInList($sPotentialManagerName)
|
$sCMPName = $oManagerTypes->isManagerInList($sPotentialManagerName)
|
||||||
? $sPotentialManagerName
|
? $sPotentialManagerName
|
||||||
: "NONE";
|
: "NONE";
|
||||||
|
|
||||||
|
$this->d3SaveShopConfVar($sCMPName);
|
||||||
|
|
||||||
|
return $sCMPName;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user