WIP
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user