This commit is contained in:
Mekan1206
2026-04-29 22:26:04 +05:00
parent 9b95087b94
commit dd633ef7da
19 changed files with 314 additions and 35 deletions

View File

@@ -11,6 +11,10 @@ trait HasShipping
*/
public function shippingPrice(): int
{
if ($this->shippingMethod) {
return intval($this->shipping_price) ?: $this->shippingMethod->price;
}
return intval($this->shipping_price) ?: OrderShipping::priceFor($this->shipping_method);
}
@@ -19,6 +23,10 @@ trait HasShipping
*/
public function formattedShippingMethod(): string
{
if ($this->shippingMethod) {
return $this->shippingMethod->name;
}
return OrderShipping::formattedShippingMethod($this->shipping_method);
}