[Added] auto safe on first approach ga4 + cmp-mod

This commit is contained in:
MaxBUhe 2024-05-31 15:46:10 +02:00
parent 0dc5565640
commit e500814e7e

View File

@ -22,13 +22,30 @@ class ManagerHandler
$aManagerList = $oManagerTypes->getManagerList();
foreach ($aManagerList as $managerName){
if ($oViewConfig->isModuleActive($managerName)){
return $managerName;
}
if ($this->getModuleSettingExplicitManagerSelectValue()){
return $this->getExplicitManager();
}
return $this->getExplicitManager();
foreach ($aManagerList as $shopModuleId => $publicCMPName){
if ($oViewConfig->isModuleActive($shopModuleId)){
$this->d3SaveShopConfVar($shopModuleId);
return $shopModuleId;
}
}
}
/**
* @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 */
$oManagerTypes = oxNew(ManagerTypes::class);
return $oManagerTypes->isManagerInList($sPotentialManagerName)
$sCMPName = $oManagerTypes->isManagerInList($sPotentialManagerName)
? $sPotentialManagerName
: "NONE";
$this->d3SaveShopConfVar($sCMPName);
return $sCMPName;
}
}