@extends('layouts.app') @section('title', 'B2B Carts') @section('content') @include('b2bportal::partials.admin_style')

B2B Carts

Track customers who added products to cart, completed orders, or abandoned checkout.

@include('b2bportal::admin.nav')

{{ ucfirst($status) }} carts

@forelse($carts as $cart) @php $customer = $cart->customer; $snapshot = $cart->customer_snapshot ?: []; $totalQty = $cart->items->sum('quantity'); @endphp @empty @endforelse
Customer Contact Items Total Qty Status Last Activity Order
{{ optional($customer)->name ?: ($snapshot['name'] ?? 'Unknown customer') }}
{{ optional($customer)->business_name ?: ($snapshot['business_name'] ?? 'No business name') }}
{{ optional($customer)->phone ?: ($snapshot['phone'] ?? '-') }}
{{ optional($customer)->email ?: ($snapshot['email'] ?? '') }}
@forelse($cart->items as $item)
{{ optional($item->product)->name }} {{ optional($item->variation)->name }} × {{ $item->quantity }}
@empty Cart cleared after order @endforelse
{{ $totalQty }} {{ ucfirst($cart->status) }} {{ optional($cart->last_activity_at ?: $cart->updated_at)->format('d M Y, h:i A') }} @if($cart->ordered_transaction_id) #{{ $cart->ordered_transaction_id }}
{{ optional($cart->ordered_at)->format('d M Y, h:i A') }} @else Not ordered yet @endif
No carts found for this filter.
{{ $carts->links() }}
@endsection