From 739aceb8bd4a971d75c941cb7603f8be53651131 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 25 Aug 2022 16:38:03 +0800 Subject: [PATCH] cancel order --- themes/default/account/order_info.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/themes/default/account/order_info.blade.php b/themes/default/account/order_info.blade.php index 42971412..2020a2cd 100644 --- a/themes/default/account/order_info.blade.php +++ b/themes/default/account/order_info.blade.php @@ -17,7 +17,7 @@
@if ($order->status == 'unpaid') {{ __('shop/account.order.order_info.to_pay') }} - {{ __('shop/account.order.order_info.cancel') }} + @endif @if ($order->status == 'shipped') @@ -146,5 +146,12 @@ window.location.reload() }) }); + + $('.cancel-order').click(function(event) { + $http.post('orders/{{ $order->number }}/cancel').then((res) => { + layer.msg(res.message) + window.location.reload() + }) + }); @endpush