Customer Profile: {{ $customer->name }}

Comprehensive customer purchase history, saved addresses, and direct communication.

@if($customer->phone) @endif
Total Orders {{ $totalOrders }}
Total Lifetime Spent ৳{{ number_format($totalSpent, 2) }}
Completed Orders {{ $completedOrders }}

Products Purchased By Customer ({{ count($purchasedProducts) }})

@if(empty($purchasedProducts))

No product purchases recorded yet.

@else
@foreach($purchasedProducts as $pid => $prod)
{{ $prod['name'] }}

{{ $prod['name'] }}

Price: ৳{{ number_format($prod['price'], 0) }}

Bought: {{ $prod['last_purchased'] }}

@endforeach
@endif

Full Order History

@forelse($customer->orders as $order) @empty @endforelse
Order # Date Items Purchased Total Amount Status View
{{ $order->order_number }} {{ $order->created_at->format('d M Y, h:i A') }}
@foreach($order->items as $item) • {{ $item->product->name ?? 'Product' }} (x{{ $item->quantity }}) @endforeach
৳{{ number_format($order->total_amount, 2) }} {{ strtoupper($order->status) }} Order
No orders found for this customer.
@if($customer->phone) @endif