@@ -244,23 +244,24 @@ protected function importShopsConfig($aConfigValues)
244244 if ($ langId == 0 ) {
245245 continue ;
246246 }
247- $ availableInLangs = $ oShop ->getAvailableInLangs ();
247+ $ viewNameGenerator = oxNew (\OxidEsales \Eshop \Core \TableViewNameGenerator::class);
248+ $ viewName = $ viewNameGenerator ->getViewName ('oxshops ' , $ langId );
248249 $ oShop ->setLanguage ($ langId );
249- if (isset ( $ availableInLangs [ $ langId ] )) {
250+ if (! is_numeric ( substr ( $ viewName , 12 ) )) {
250251 $ oShop ->loadInLang ($ langId , $ sShopId );
251- foreach ( $ aOxShopSettings as $ sVarName => $ mVarValue ) {
252- $ iPosUnderscore = strrpos ( $ sVarName , ' _ ' );
253- if ( $ iPosUnderscore !== false ) {
254- $ sStringAfterUnderscore = substr ( $ sVarName , $ iPosUnderscore + 1 );
255- if ( is_numeric ( $ sStringAfterUnderscore ) && $ sStringAfterUnderscore == $ langId ) {
256- $ sFiledName = substr ( $ sVarName , 0 , $ iPosUnderscore ); // String before last underscore
257- $ aOxShopSettings [ $ sFiledName] = $ mVarValue ;
258- }
252+ }
253+ foreach ( $ aOxShopSettings as $ sVarName => $ mVarValue ) {
254+ $ iPosUnderscore = strrpos ( $ sVarName , ' _ ' );
255+ if ( $ iPosUnderscore !== false ) {
256+ $ sStringAfterUnderscore = substr ( $ sVarName , $ iPosUnderscore + 1 );
257+ if ( is_numeric ( $ sStringAfterUnderscore ) && $ sStringAfterUnderscore == $ langId ) {
258+ $ sFiledName = substr ( $ sVarName , 0 , $ iPosUnderscore ); // String before last underscore
259+ $ aOxShopSettings [ $ sFiledName ] = $ mVarValue ;
259260 }
260261 }
261- $ oShop ->assign ($ aOxShopSettings );
262- $ oShop ->save ();
263262 }
263+ $ oShop ->assign ($ aOxShopSettings );
264+ $ oShop ->save ();
264265 }
265266 }
266267 }
0 commit comments