diff --git a/beike/Models/Order.php b/beike/Models/Order.php index bda22c90..c499762e 100644 --- a/beike/Models/Order.php +++ b/beike/Models/Order.php @@ -68,7 +68,9 @@ class Order extends Base public function getStatusFormatAttribute() { - return trans('order.' . $this->status); + $status_format = trans('order.' . $this->status); + $status_format = hook_filter('order.status_format', $status_format); + return $status_format; } public function getTotalFormatAttribute() diff --git a/themes/default/account/order.blade.php b/themes/default/account/order.blade.php index 9edc720a..cee30c2a 100644 --- a/themes/default/account/order.blade.php +++ b/themes/default/account/order.blade.php @@ -53,7 +53,7 @@ @if ($loop->first) {{ currency_format($order->total, $order->currency_code, $order->currency_value) }} - {{ __("common.order.{$order->status}") }} + {{$order->status_format}} {{ __('shop/account.order.check') }} diff --git a/themes/default/account/order_info.blade.php b/themes/default/account/order_info.blade.php index 1da80bc5..79c8ead8 100644 --- a/themes/default/account/order_info.blade.php +++ b/themes/default/account/order_info.blade.php @@ -46,7 +46,7 @@ {{ $order->number }} {{ $order->created_at }} - {{ __("common.order.{$order->status}") }} + {{$order->status_format}} {{ currency_format($order->total, $order->currency_code, $order->currency_value) }}