fix: display only delivery types that have a price and auto-select first

This commit is contained in:
Valentin Lab
2025-10-05 10:08:02 +02:00
parent bd63a92604
commit e080d98e81
2 changed files with 29 additions and 3 deletions

View File

@@ -15,9 +15,15 @@ class DeliveryTypes
$types = self::getAll();
foreach ($types as $type) {
$price = self::getPrice($type->id, $weight);
if ($price === false) {
continue;
}
$data[$type->id] = [
'name' => $type->name,
'price' => self::getPrice($type->id, $weight),
'price' => $price,
];
}