Moin zusammen!
Dank der Hilfe von @drakon konnte ich das Problem tatsächlich nachstellen und beheben!
Vielen Dank dafür!
Das betrifft entsprechend definitiv nicht alle Shops, sondern nur welche, die einen gewissen alten “Übersetzungs-Zustand” besitzen.
Eine entsprechende interne Änderungsabfrage ist bereits auf dem Weg.
Für euch als mögliche Hotfixes bis dahin:
-
Die Länder-Übersetzungen einfach einmal öffnen und neu speichern
oder -
Nach den hier markierten Zeilen den folgenden Code anfügen:
if (!array_key_exists(‘allow_shipping’, $countryTranslations[$countryId])) {
return $allowedByDefault;
}
Die gesamte Methode sähe dann so aus:
private function isShippingAllowed(int $countryId): bool
{
$queryBuilder = $this->get('dbal_connection')->createQueryBuilder();
$allowedByDefault = (bool) $queryBuilder->select('allow_shipping')
->from('s_core_countries', 'countries')
->where('countries.id = :countryId')
->setParameter(':countryId', $countryId)
->execute()
->fetchColumn();
$countryTranslations = $this->get('modules')->sAdmin()->sGetCountryTranslation();
if (!$countryTranslations) {
return $allowedByDefault;
}
if (!array_key_exists($countryId, $countryTranslations)) {
return $allowedByDefault;
}
if (!array_key_exists('allow_shipping', $countryTranslations[$countryId])) {
return $allowedByDefault;
}
return $countryTranslations[$countryId]['allow_shipping'];
}
Ich hoffe, dass euch dies erstmal weiter hilft!
Liebe Grüße,
Patrick Stahl