@php $vendorLabel = $vendor === 'cj' ? 'CJ Dropshipping' : 'Printful'; $vendorBadgeStyle = $vendor === 'cj' ? 'background:#DBEAFE;color:#1E40AF' : 'background:#EDE9FE;color:#6D28D9'; $routeBase = $vendor === 'cj' ? 'admin.products-research-cjd' : 'admin.products-research-printful'; $otherVendor = $vendor === 'cj' ? 'printful' : 'cj'; $otherRouteBase = $vendor === 'cj' ? 'admin.products-research-printful' : 'admin.products-research-cjd'; $otherVendorLabel = $vendor === 'cj' ? 'Printful' : 'CJ Dropshipping'; $hasFilters = filled($query) || filled($category) || filled($sort) || $trending; @endphp @if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
{{ $vendorLabel }}
Catalog Research
Live search against the {{ $vendorLabel }} Catalog API. Results shown are products available for your store — add items you want to sell to your Selected Products list, then customize pricing & listing details before publishing.
@if ($error)
Couldn't load the {{ $vendorLabel }} catalog
{{ $error }}
@role('super-admin') Check Gateway Settings @endrole
@endif
@if ($vendor === 'cj')
@endif @if ($hasFilters)
Filters: @if ($query) "{{ $query }}" @endif @if ($category) {{ $category }} @endif @if ($sort === 'popularity') Most Listed @elseif ($sort) {{ $sort === 'price_asc' ? 'Price ↑' : 'Price ↓' }} @endif @if ($trending) Trending @endif Clear all
@endif
@if (! $error)
@if ($category && ! is_null($totalRecords)) {{ count($results) }} {{ Str::plural('match', count($results)) }} on this page for category "{{ $category }}" (out of {{ number_format($totalRecords) }} total {{ $query ? 'results for "'.$query.'"' : 'results' }}) @elseif (! is_null($totalRecords)) {{ number_format($totalRecords) }} {{ Str::plural('result', $totalRecords) }} @else {{ count($results) }} {{ Str::plural('result', count($results)) }} @endif @if ($totalPages) · page {{ $page }} of {{ number_format($totalPages) }} @elseif ($page > 1) · page {{ $page }} @endif
@endif @if (empty($results) && ! $error)
@if ($hasFilters) No products matched your search. Try a different keyword or clear the category filter. @else Search the {{ $vendorLabel }} catalog above to start sourcing products. @endif
@endif
@foreach ($results as $item) @php $isSelected = $selectedExternalIds->contains($item['vendor_external_id']); @endphp
{{ $item['title'] }}
{{ $item['title'] }}
@if ($item['variant_count'] > 0) {{ $item['variant_count'] }} {{ Str::plural('variant', $item['variant_count']) }} @endif @if (! empty($item['category_hint'])) {{ $item['category_hint'] }} @endif
@if (isset($item['base_cost']))
${{ number_format($item['base_cost'], 2) }} base cost
@endif
@csrf
@endforeach
@if (! empty($results) && ($page > 1 || $hasNextPage)) @endif