Aufruf des Warenkorbs im EN-Sprachhop gibt seit Update auf 5.6.7 Fehler

@allshop schrieb:

@Patrick Stahl schrieb:

Moin zusammen!

Dank der Hilfe von @drakon‍ konnte ich das Problem tatsächlich nachstellen und beheben! :slight_smile:
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:

  1. Die Länder-Übersetzungen einfach einmal öffnen und neu speichern
    oder
  2. 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! :slight_smile:

Liebe Grüße,
Shopware Patrick 

 

HALLO;

WO FINDE ICH.

  1. Die Länder-Übersetzungen einfach einmal öffnen und neu speichern

gRU?

 

Grundeinstellungen > Shopeinstellungen > Länder: z.B. Deutschland wählen + Übersetzung von „Name“