@php $syncing = $this->isScraping(); $lastScraped = $this->lastScrapedAt(); $pagedResults = $this->pagedResults; $totalPages = $this->totalPages; $totalFiltered = $this->totalFiltered; $stats = $this->stats; $progressData = json_encode($this->syncProgressData); @endphp {{-- Alpine progress bar script --}} {{-- Background poll (Alpine handles progress updates during scraping and triggers $wire.$refresh() on completion) --}}
{{-- ── Controls bar ──────────────────────────────────────────────────── --}}
Allmakes PSP — Stock & Price Sync
@if(!$syncing) Force Re-check All @endif @if($syncing) Scraping… @else Scrape All @endif Starting…
Settings
{{-- Sync meta line --}}
@if($syncing) Scraping PSP… @elseif($lastScraped) Last scraped {{ $lastScraped }} @else Never scraped — click Scrape Now to start @endif
{{-- Progress / status bar (shown when syncing OR when there's a phase message) --}}
{{-- Error state --}} {{-- Cancelled state --}} {{-- Complete state --}} {{-- Active scraping progress --}}
{{-- ── Stop-scrape confirmation modal (pure Alpine, no Livewire) ────────── --}}
{{-- Backdrop --}}
{{-- Card --}}
{{-- Header --}}

Stop the scrape?

The scraper will finish its current SKU then halt.
Any updates already written will not be rolled back.

{{-- Footer --}}
{{-- ── Stats cards ───────────────────────────────────────────────────── --}}
Total Products
{{ number_format($stats['total']) }}
In Stock
{{ number_format($stats['in_stock']) }}
In Transit
{{ number_format($stats['in_transit']) }}
Out of Stock
{{ number_format($stats['out_of_stock']) }}
Discontinued
{{ number_format($stats['discontinued']) }}
Superseded
{{ number_format($stats['superseded']) }}
Never Checked
{{ number_format(max(0, $stats['never_checked'])) }}
{{-- ── Results table ─────────────────────────────────────────────────── --}} @php $filterLabels = [ 'in_stock' => 'In Stock', 'in_transit' => 'In Transit', 'out_of_stock' => 'Out of Stock', 'discontinued' => 'Discontinued', 'superseded' => 'Superseded', 'never_checked'=> 'Never Checked', ]; @endphp
@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 }}"

@elseif($pagedResults->isEmpty())

Not scraped yet

{{ $stats['total'] }} {{ $stats['total'] === 1 ? 'product' : 'products' }} ready — click Scrape Now to check stock & prices.

@else @if($statusFilter !== '')
Filtered by: {{ $filterLabels[$statusFilter] ?? $statusFilter }}
@endif
@foreach($pagedResults as $row) @php $statusMap = [ 'in_stock' => ['label' => 'In Stock', 'class' => 'pill-in-stock'], 'in_transit' => ['label' => 'In Transit', 'class' => 'pill-in-transit'], 'out_of_stock' => ['label' => 'Out of Stock', 'class' => 'pill-out-of-stock'], 'discontinued' => ['label' => 'Discontinued', 'class' => 'pill-discontinued'], 'superseded' => ['label' => 'Superseded', 'class' => 'pill-superseded'], ]; $st = $statusMap[$row->stock_status] ?? ['label' => ucfirst(str_replace('_',' ',$row->stock_status ?? '')), 'class' => 'pill-discontinued']; @endphp @endforeach
Supplier SKU PSP Product Status Supplier Price Cydekick Cost UOI Qty @ Allmakes Last Checked
@if($row->product_id) {{ $row->supplier_sku }} @else {{ $row->supplier_sku }} @endif View @if($row->product_name) {{ Str::limit($row->product_name, 60) }} @if($row->product_sku && $row->product_sku !== $row->supplier_sku)
{{ $row->product_sku }} @endif @else — @endif @if($row->error_message)
⚠ {{ Str::limit($row->error_message, 50) }} @endif
@if($row->stock_status) {{ $st['label'] }} @else Never checked @endif {{ ($row->supplier_price !== null && (float)$row->supplier_price > 0) ? '£'.number_format((float)$row->supplier_price, 2) : '—' }} {{ $row->product_cost !== null ? '£'.number_format((float)$row->product_cost, 2) : '—' }} @if($row->uoi !== null) {{ $row->uoi }} @else — @endif @if($row->qty_set !== null) {{ (int)$row->qty_set }} @else — @endif {{ $row->last_checked_at ? \Carbon\Carbon::parse($row->last_checked_at)->diffForHumans() : '—' }}
{{-- ── Pagination ─────────────────────────────────────────── --}} @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
{{-- ── Instructions ────────────────────────────────────────────────── --}}
{{-- How It Works --}}
How It Works
  1. Products are matched to Allmakes by the Supplier Code set on the product's supplier tab.
  2. The scraper logs in to Allmakes PSP and checks each product's stock status and price.
  3. Stock quantity is set to {{ app(\Webkul\AllmakesPsp\Settings\PspSettings::class)->available_qty }} at the Allmakes warehouse when In Stock or In Transit, and 0 when Out of Stock or Discontinued.
  4. The product cost price is updated automatically whenever the Allmakes price changes.
  5. The regular scrape runs automatically every 6 hours — no action needed.
{{-- Buttons explained --}}
Buttons
Scrape All Scrapes all products immediately — checks stock status and price. Skips products checked recently (respects the check interval). Fast.
Force Re-check All Same as Scrape All but ignores the last-checked time — every product is re-checked regardless of when it was last scraped.
Settings Configure PSP credentials, warehouse, check interval and available quantity.
{{-- Notes drawer — fixed vertical tab on right edge --}}