@php $syncing = $this->isScraping(); $pagedResults = $this->pagedResults; $totalPages = $this->totalPages; $totalFiltered = $this->totalFiltered; $stats = $this->stats; $progressData = json_encode($this->syncProgressData); @endphp @if($syncing)
@else
@endif {{-- Controls bar --}}
Allmakes PSP — Product Images & Data
@if(!$syncing) Fetch Images Starting… Fetch Product Data Starting… Fetch All Starting… @else Running… @endif
Stock & Price
@if($syncing) Fetching product data… @else One-off scrape — fetch images and product data from Allmakes PSP @endif
{{-- Progress bar --}}
{{-- Stop confirmation modal --}}

Stop the fetch?

Any data already written will not be rolled back.

{{-- Stats cards --}}
Total Products
{{ number_format($stats['total']) }}
Has Image
{{ number_format($stats['has_image']) }}
No Image
{{ number_format($stats['no_image']) }}
Has Product Data
{{ number_format($stats['has_data']) }}
Has Fitments
{{ number_format($stats['has_fitments']) }}
{{-- Results table --}}
@if($stats['total'] === 0)

No Allmakes products found

Add Allmakes4×4 as a supplier on your products with a Supplier Code to get started.

@elseif($pagedResults->isEmpty() && $search !== '')

No results for "{{ $search }}"

@else @if($imageFilter !== '')
Filtered by: {{ $imageFilter === 'has' ? 'Has Image' : 'No Image' }}
@endif
@php $r2Base = null; try { $r2Settings = app(\App\Settings\R2StorageSettings::class); $r2Base = rtrim($r2Settings->public_url ?? '', '/') ?: null; } catch (\Throwable) {} @endphp @foreach($pagedResults as $row) @php $images = json_decode($row->images ?? 'null', true); $hasImg = ! empty($images); $firstImg = $hasImg ? (is_array($images) ? ($images[0] ?? null) : null) : null; if ($firstImg) { $thumbUrl = $r2Base ? $r2Base . '/' . ltrim($firstImg, '/') : \Illuminate\Support\Facades\Storage::disk('public')->url($firstImg); } else { $thumbUrl = null; } $dims = collect([$row->psp_height, $row->psp_width, $row->psp_length]) ->filter() ->map(fn($v) => number_format((float)$v, 2)) ->implode(' × '); @endphp @endforeach
Image Supplier SKU PSP Product Brand Weight (kg) H × W × L (m) Country Grade Quality UOI Fitments Image Fetched
@if($hasImg && $thumbUrl) {{ $row->supplier_sku }} @else
@endif
{{ $row->supplier_sku }} View {{ \Illuminate\Support\Str::limit($row->product_name ?? '—', 55) }} @if($row->product_sku && $row->product_sku !== $row->supplier_sku)
{{ $row->product_sku }} @endif
@if(!empty($row->psp_brand)) {{ $row->psp_brand }} @else — @endif @if($row->psp_weight !== null) {{ number_format((float)$row->psp_weight, 3) }} @else — @endif @if($dims) {{ $dims }} @else — @endif @if($row->psp_country_origin) {{ $row->psp_country_origin }} @else — @endif @if($row->psp_quality_grade !== null) {{ $row->psp_quality_grade }} @else — @endif @if($row->psp_quality_rating !== null) {{ $row->psp_quality_rating }} @else — @endif @if($row->uoi !== null) {{ $row->uoi }} @else — @endif @if($row->fitment_count > 0) @else — @endif {{ $row->image_fetched_at ? \Carbon\Carbon::parse($row->image_fetched_at)->diffForHumans() : '—' }}
@if($totalPages > 1 || $totalFiltered > $perPage)
Showing {{ (($page - 1) * $perPage) + 1 }}–{{ min($page * $perPage, $totalFiltered) }} of {{ number_format($totalFiltered) }} products @if($search !== '') · filtered @endif
Page {{ $page }} of {{ $totalPages }}
@endif @endif
@once @endonce {{-- Notes drawer — fixed vertical tab on right edge --}}