@extends('layouts.buyer') @section('title', 'Detail Pesanan: ' . $order->order_number) @section('content')

Pesanan: {{ $order->order_number }}

@if ($order->status === 'pending') Status: Pending @elseif ($order->status === 'completed') Status: Completed @elseif ($order->status === 'cancelled') Status: Cancelled @else Status: {{ ucfirst($order->status) }} @endif

Dibuat pada: {{ $order->created_at->format('d M Y, H:i') }} WIB | ID Pengguna: #{{ $order->user_id }}

Semua Pesanan Belanja Lagi
Rincian Item Produk (Order Items)
@foreach ($order->orderItems as $item) @endforeach
Produk Harga Satuan Jumlah Subtotal
@if ($item->product && $item->product->image_url) {{ $item->product->name }} @else @endif
{{ $item->product ? $item->product->name : 'Produk #' . $item->product_id }}
ID Produk: #{{ $item->product_id }}
{{ $item->formatted_price }} {{ $item->quantity }} unit {{ $item->formatted_subtotal }}
Informasi Pembeli
User ID #{{ $order->user_id }}
Nama {{ $order->user ? $order->user->name : Auth::user()->name }}
Email {{ $order->user ? $order->user->email : Auth::user()->email }}
Alamat Pengiriman

{{ $order->shipping_address ?: 'Alamat Pengiriman Standar' }}

@if ($order->notes)
Catatan Pesanan:

"{{ $order->notes }}"

@endif
@endsection