diff --git a/Core/ConfigImport.php b/Core/ConfigImport.php index ae868c6..5dd9447 100644 --- a/Core/ConfigImport.php +++ b/Core/ConfigImport.php @@ -244,23 +244,24 @@ protected function importShopsConfig($aConfigValues) if ($langId == 0) { continue; } - $availableInLangs = $oShop->getAvailableInLangs(); + $viewNameGenerator = oxNew(\OxidEsales\Eshop\Core\TableViewNameGenerator::class); + $viewName = $viewNameGenerator->getViewName('oxshops', $langId); $oShop->setLanguage($langId); - if (isset($availableInLangs[$langId])) { + if (!is_numeric(substr($viewName, 12))) { $oShop->loadInLang($langId, $sShopId); - foreach ($aOxShopSettings as $sVarName => $mVarValue) { - $iPosUnderscore = strrpos($sVarName, '_'); - if ($iPosUnderscore !== false) { - $sStringAfterUnderscore = substr($sVarName, $iPosUnderscore + 1); - if (is_numeric($sStringAfterUnderscore) && $sStringAfterUnderscore == $langId) { - $sFiledName = substr($sVarName, 0, $iPosUnderscore); // String before last underscore - $aOxShopSettings[$sFiledName] = $mVarValue; - } + } + foreach ($aOxShopSettings as $sVarName => $mVarValue) { + $iPosUnderscore = strrpos($sVarName, '_'); + if ($iPosUnderscore !== false) { + $sStringAfterUnderscore = substr($sVarName, $iPosUnderscore + 1); + if (is_numeric($sStringAfterUnderscore) && $sStringAfterUnderscore == $langId) { + $sFiledName = substr($sVarName, 0, $iPosUnderscore); // String before last underscore + $aOxShopSettings[$sFiledName] = $mVarValue; } } - $oShop->assign($aOxShopSettings); - $oShop->save(); } + $oShop->assign($aOxShopSettings); + $oShop->save(); } } }