Feat: Adding Translations to Payment and Shipping Methods, removing unecessary shipping method fulfillment type

This commit is contained in:
2026-09-15 23:51:10 +03:00
parent ea73cc3562
commit 97004234f0
14 changed files with 447 additions and 36 deletions
@@ -6,6 +6,8 @@ use Lunar\DataTypes\ShippingOption;
use Lunar\Facades\Pricing;
use Lunar\Shipping\Models\ShippingMethod;
use Lunar\Shipping\Models\ShippingRate;
use Modules\Core\Shipping\Support\FulfillmentType;
use Modules\Core\Shipping\Support\ShippingMethodName;
/**
* Shared by any carrier driver that also supports Lunar's own price-break
@@ -31,12 +33,13 @@ trait ResolvesFixedPricing
}
return new ShippingOption(
name: $shippingMethod->name ?: $this->name(),
name: ShippingMethodName::resolve($shippingMethod) ?: $this->name(),
description: $shippingMethod->description ?: $this->description(),
identifier: $shippingRate->getIdentifier(),
price: $pricing->matched->price,
taxClass: $shippingRate->getTaxClass(),
taxReference: $shippingRate->getTaxReference(),
collect: FulfillmentType::isStorePickup($shippingMethod),
);
}
}