Feat: Adding Translations to Payment and Shipping Methods, removing unecessary shipping method fulfillment type
This commit is contained in:
1 parent
ea73cc3562
commit
97004234f0
14 files changed
+447
-36
No files matched your search
@@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user