{{-- Header --}}

My Orders

View and manage your digital purchases

{{-- Stats --}}
Total Orders
{{ number_format($stats['total_orders']) }}
Total Spent
${{ number_format($stats['total_spent'], 2) }}
{{-- Filters --}}
@if(request()->hasAny(['search','status'])) Clear @endif
{{-- Table --}}

{{ $orders->total() }} Orders found

@if($orders->isEmpty())
🛍️

No orders match your criteria

@else
@foreach ($orders as $order) @endforeach
Order Ref Items Total Status Date Action
#{{ strtoupper(substr($order->ulid, -10)) }}
@foreach ($order->items as $item)
@if($item->quantity > 1) {{ $item->quantity }}x @endif {{ Str::limit($item->product_title ?? $item->product?->title, 40) }}
@endforeach
@if($order->currency === 'crypto') {{ number_format($order->total, 6) }} {{ strtoupper($order->cryptoPayment?->crypto_currency ?? 'CRYPTO') }} @else ${{ number_format($order->total, 2) }} @endif
@php $statusStyles = [ 'paid' => 'bg-emerald-500/10 text-emerald-400 border-emerald-500/10', 'pending' => 'bg-amber-500/10 text-amber-400 border-amber-500/10', 'failed' => 'bg-rose-500/10 text-rose-400 border-rose-500/10', 'refunded' => 'bg-purple-500/10 text-purple-400 border-purple-500/10', ]; @endphp {{ $order->status }}
{{ $order->created_at->format('M d, Y') }} @if($order->isPaid()) @else Pending Payment @endif
@if($orders->hasPages())
{{ $orders->links() }}
@endif @endif