versand bugfix no countries defined

This commit is contained in:
OpenXE 2023-10-22 18:41:08 +02:00
parent ca73f3dda5
commit fb32cda643

View File

@ -451,7 +451,12 @@ abstract class Versanddienstleister
$address['product'] = $products[0]->Id ?? '';
$countries = $this->app->DB->SelectArr("SELECT iso, bezeichnung_de name, eu FROM laender ORDER BY bezeichnung_de");
if(!empty($countries)) {
$countries = array_combine(array_column($countries, 'iso'), $countries);
} else {
$countries = Array();
$this->app->Tpl->addMessage('error', 'Länderliste ist leer. Siehe Einstellungen -> Länderliste.', false, 'PAGE');
}
$json['form'] = $address;
$json['countries'] = $countries;