@@ -244,20 +244,23 @@ protected function importShopsConfig($aConfigValues)
244244 if ($ langId == 0 ) {
245245 continue ;
246246 }
247+ $ availableInLangs = $ oShop ->getAvailableInLangs ();
247248 $ oShop ->setLanguage ($ langId );
248- $ oShop ->loadInLang ($ langId , $ sShopId );
249- foreach ($ aOxShopSettings as $ sVarName => $ mVarValue ) {
250- $ iPosUnderscore = strrpos ($ sVarName , '_ ' );
251- if ($ iPosUnderscore !== false ) {
252- $ sStringAfterUnderscore = substr ($ sVarName , $ iPosUnderscore + 1 );
253- if (is_numeric ($ sStringAfterUnderscore ) && $ sStringAfterUnderscore == $ langId ) {
254- $ sFiledName = substr ($ sVarName , 0 , $ iPosUnderscore ); // String before last underscore
255- $ aOxShopSettings [$ sFiledName ] = $ mVarValue ;
249+ if (isset ($ availableInLangs [$ langId ])) {
250+ $ 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+ }
256259 }
257260 }
261+ $ oShop ->assign ($ aOxShopSettings );
262+ $ oShop ->save ();
258263 }
259- $ oShop ->assign ($ aOxShopSettings );
260- $ oShop ->save ();
261264 }
262265 }
263266 }
0 commit comments