From f744dc6b0252239f3cbfc7c39c9c830d2de4e7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?what=5F=E6=9D=91=E9=95=BF?= <178277164@qq.com> Date: Mon, 17 Apr 2023 01:50:07 +0000 Subject: [PATCH] =?UTF-8?q?!84=20=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81=20*?= =?UTF-8?q?=20Merge=20branch=20'dev'=20of=20https://gitee.com/what520/beik?= =?UTF-8?q?eshop=20into=20dev=20*=20=E5=A2=9E=E5=8A=A0hook,=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E6=8F=92=E4=BB=B6=E4=B8=AD=E8=A6=81=E6=B1=82=E7=9A=84?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20*=20=E8=B0=83=E6=95=B4=E7=8A=B6=E6=80=81=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E4=B8=8E=E5=90=8E=E7=AB=AF=E7=9A=84=E4=B8=80=E8=87=B4=20*=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Models/Order.php | 4 +++- themes/default/account/order.blade.php | 2 +- themes/default/account/order_info.blade.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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) }}