This repository was archived by the owner on Jun 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -254,17 +254,20 @@ protected function importConfigValues($aConfigValues)
254254 $ _POST ['shp ' ] = $ sShopId ;
255255 //just setting the correct shopId on this object because it is defaults to one load by config init.
256256 //doing so does not having any known effect.
257- $ oConfig ->getActiveShop ()->setShopId ($ sShopId );
258-
257+ $ shop = $ oConfig ->getActiveShop ();
258+ $ shop ->setShopId ($ sShopId );
259+ //set the global config onject in oxid 6.1
260+ $ shop ->setConfig ($ oConfig );
259261 //we need a fresh instance here because
260262 //shopId calculator is private
261263 $ freshUtilsObject = new \OxidEsales \Eshop \Core \UtilsObject ();
262- Registry::set (\OxidEsales \Eshop \Core \UtilsObject::class,$ freshUtilsObject );
263-
264+ Registry::set (\OxidEsales \Eshop \Core \UtilsObject::class, $ freshUtilsObject );
265+ //clear oxnew cache that may hold objects like Shop class from the first run
266+ $ freshUtilsObject ->resetInstanceCache ();
264267
265268 $ ouo = Registry::get (\OxidEsales \Eshop \Core \UtilsObject::class);
266269 if ($ oConfig ->getShopId () != $ sShopId ||
267- $ oConfig ->getActiveShop ()->getShopId () != $ sShopId ||
270+ $ oConfig ->getActiveShop ()->getShopId () != $ sShopId ||
268271 $ ouo ->getShopId () != $ sShopId ) {
269272 throw new \Exception ("ShopId was not set correctly, this means shop internal have changed and import must be adapted " );
270273 }
You can’t perform that action at this time.
0 commit comments