diff --git a/app/Http/Controllers/Account/OrderController.php b/app/Http/Controllers/Account/OrderController.php index a8802ae..396cc8f 100644 --- a/app/Http/Controllers/Account/OrderController.php +++ b/app/Http/Controllers/Account/OrderController.php @@ -44,7 +44,11 @@ public function show(string $locale, Request $request, int $orderId): View return view('account.orders.show', [ 'order' => $order, 'paymentMethodName' => $paymentMethodName, - 'shipments' => $order->shipments->whereNull('cancelled_at')->whereNotNull('tracking_reference'), + // Active shipments with a number; return vouchers are the shop's + // business, not the customer's. + 'shipments' => $order->shipments + ->reject(fn ($shipment) => $shipment->isCancelled() || $shipment->isReturn() || blank($shipment->tracking_reference)) + ->values(), ]); } } diff --git a/public/static/logos/core/elta-courier-logo.png b/public/static/logos/core/elta-courier-logo.png new file mode 100644 index 0000000..aee4f2b Binary files /dev/null and b/public/static/logos/core/elta-courier-logo.png differ diff --git a/resources/views/account/orders/index.blade.php b/resources/views/account/orders/index.blade.php index e7f1afd..fb1bebe 100644 --- a/resources/views/account/orders/index.blade.php +++ b/resources/views/account/orders/index.blade.php @@ -35,7 +35,7 @@
{{ __('storefront.orders.tracking_empty') }}
+ @else +Η παραγγελία σου #{{ $reference }} είναι καθ’ οδόν. Θα τη λάβεις σύντομα.
+Η παραγγελία σου #{{ $reference }} είναι καθ’ οδόν. Θα τη λάβεις σύντομα.
- @include('emails.partials.button', [ - 'url' => route('account.orders', ['locale' => 'el']), - 'label' => 'Οι παραγγελίες μου', - ]) + @foreach ($shipments ?? [] as $shipment) ++ {{ $shipment->carrierLabel() }} · Αριθμός αποστολής: {{ $shipment->tracking_reference }} + @if ($carrierUrl = $shipment->trackingUrl()) + · Παρακολούθηση στη σελίδα του courier + @endif +
+ @endforeach + + + + {{-- Orders with an account: their order page shows the tracking history we sync from the courier. --}} + @include('emails.partials.button', $order->customer_id + ? ['url' => route('account.orders.show', ['locale' => 'el', 'orderId' => $order->id]), 'label' => 'Παρακολούθηση παραγγελίας'] + : ['url' => route('account.orders', ['locale' => 'el']), 'label' => 'Οι παραγγελίες μου']) @endsection @section('footer') diff --git a/resources/views/vendor/core/order/notifications/placed.blade.php b/resources/views/vendor/core/order/notifications/placed.blade.php index f4c673b..c4e1383 100644 --- a/resources/views/vendor/core/order/notifications/placed.blade.php +++ b/resources/views/vendor/core/order/notifications/placed.blade.php @@ -46,7 +46,7 @@Λάβαμε την παραγγελία σου #{{ $reference }} - στις {{ $order->placed_at?->format('d/m/Y') }}. + στις {{ $order->placed_at?->inDisplayTimezone()->format('d/m/Y') }}. Θα σε ενημερώσουμε με email μόλις σταλεί.