@extends('admin.layouts.app') @section('title', 'Incomplete Orders') @section('content')

Incomplete Orders

Track abandoned carts and recover sales

{{ $incompleteOrders->total() }} Abandoned Carts

Total Orders

{{ $incompleteOrders->total() }}

Pending

{{ $incompleteOrders->where('status', 'pending')->count() }}

Confirmed

0

Cancelled

0

@if(session('success'))
{{ session('success') }}
@endif
@if(request()->hasAny(['search', 'date_filter'])) Clear @endif
@forelse($incompleteOrders as $order) @php $products = $order->products ?? []; $productCount = array_sum(array_column($products, 'quantity')); @endphp @empty @endforelse
Customer Contact Location Products Charges Time Actions

{{ $order->name ?? 'Unknown' }}

@if($order->email)

{{ $order->email }}

@endif
@if($order->phone)
{{ $order->phone }}

{{ $order->ip_address ?? 'No IP' }}

@else N/A @endif
@if($order->district || $order->area)

{{ $order->district ?? '' }}

{{ $order->area ?? '' }}

@endif @if($order->address)

{{ Str::limit($order->address, 30) }}

@else No address @endif
@if(count($products) > 0)

{{ $productCount }} item(s)

@foreach(array_slice($products, 0, 2) as $product)
{{ $product['name'] ?? 'Product' }} × {{ $product['quantity'] ?? 1 }} @if(!empty($product['color']) || !empty($product['size'])) ({{ implode(', ', array_filter([$product['color'] ?? null, $product['size'] ?? null])) }}) @endif
@endforeach @if(count($products) > 2)

+{{ count($products) - 2 }} more

@endif
@else Empty cart @endif
Subtotal: ৳{{ number_format($order->subtotal ?? 0) }}
Shipping: ৳{{ number_format($order->shipping_charge ?? 0) }}
@if($order->shipping_class)

{{ $order->shipping_class }}

@endif
Total: ৳{{ number_format($order->total ?? 0) }}

{{ $order->created_at?->diffForHumans() }}

{{ $order->created_at?->format('M d, h:i A') }}

@if($order->phone) @endif
@csrf
@csrf @method('DELETE')

No Incomplete Orders

All customers have completed their checkouts!

@if($incompleteOrders->hasPages())
{{ $incompleteOrders->links() }}
@endif
@endsection @push('scripts') @endpush