better management of shipping and basket summary display

This commit is contained in:
ludo
2023-12-03 00:40:47 +01:00
parent a84995e0ce
commit 5d5ea92127
26 changed files with 317 additions and 477 deletions

View File

@@ -9,6 +9,16 @@ class Deliveries
{
use Basic;
public static function getSaleChannelId($deliveryId)
{
return $deliveryId ? Deliveries::getField($deliveryId, 'sale_channel_id') : SaleChannels::getDefaultID();
}
public static function getDefault()
{
return Delivery::active()->atHouse()->first();
}
public static function getOptions()
{
return Delivery::orderBy('name', 'asc')->pluck('name', 'id')->toArray();