@php $isDone = in_array($this->jobStatus, ['completed', 'failed']); $pct = $this->totalRows > 0 ? min(100, (int) round(($this->processedRows / $this->totalRows) * 100)) : ($this->jobStatus === 'processing' ? 5 : 0); $isRunning = $this->jobId && !$isDone; $knownColumns = ['sku','supplier_name','supplier_code','barcode','purchase_price','tax_percent','currency','min_order_qty','pack_size','is_default','default','tax_%']; @endphp
{{-- Progress section --}} @if($this->jobId) @if($isDone) {{ $this->jobStatus === 'completed' ? 'Import Complete' : 'Import Failed' }} @else Importing Suppliers… @endif @if($isDone) {{ $this->importedRows }} imported · {{ $this->skippedRows }} skipped · {{ $this->failedRows }} failed @else Processing in the background — you can leave this page and come back. @endif
@if($this->totalRows > 0) {{ $this->processedRows }} / {{ $this->totalRows }} rows @elseif($this->jobStatus === 'pending') Queued… @else Starting… @endif {{ $pct }}%
@if($this->totalRows > 0 || $isDone)
{{ $this->importedRows }}
Imported
{{ $this->skippedRows }}
Skipped
{{ $this->failedRows }}
Failed
@endif @if(count($this->allErrors) > 0)
{{ count($this->allErrors) }} row{{ count($this->allErrors) !== 1 ? 's' : '' }} with issues
@if(count($this->allErrors) >= 200) Showing first 200 — fix these and re-import @endif
@foreach($this->allErrors as $i => $err) @endforeach
Row SKU Issue
{{ $err['row'] ?? '—' }} {{ $err['sku'] ?? '—' }} {{ $err['error'] ?? '' }}
@endif @if($isDone) Import Another File @endif
@endif {{-- Upload form --}} @if(!$this->jobId) Import Supplier Pricing Upload a CSV to add or update supplier pricing records on your products.
{{ $this->form }} Start Import
@endif {{-- CSV Preview --}} @if(!$this->jobId)
Import Preview Green = mapped column, grey = ignored.
Missing required columns
Your file is missing: . The import will be rejected.
#

Showing rows preview — full file processed on import.

@endif {{-- Instructions --}} Import Instructions How to prepare your supplier import file.
{{-- Columns (spreadsheet style) --}}

CSV column headers

Supplier Columns
sku required
supplier_name required
supplier_code optional
barcode optional
purchase_price optional
tax_percent optional
currency optional
min_order_qty optional
pack_size optional
is_default optional
{{-- Right panel --}}
Supported Formats
CSV

Row 1 must be column headers. Names are case-insensitive.

How It Works
1

Each row matches a product by SKU and a supplier by supplier_name — both must already exist.

2

If the supplier record already exists for that product it is updated. If not, a new record is created.

3

A product can have multiple supplier rows — one per supplier.

4

Rows where SKU or supplier name is not found are skipped — no new products or suppliers are created.

Template

Download a ready-to-fill CSV with all column headers and one example row.

Download CSV Template
Supplier Name Must Match Exactly

The supplier_name column must match the name in Suppliers exactly (case-insensitive).

e.g. if the supplier is saved as Allmakes4x4 you cannot use Allmakes.

{{-- Example CSV --}}
Example CSV
sku,supplier_name,supplier_code,barcode,purchase_price,tax_percent,currency,min_order_qty,pack_size,is_default
YZQ100110,Allmakes4x4,YZQ100110,,0.49,,GBP,1,,1
ABC123,Britpart,BP-ABC123,5012345678901,12.50,20.00,GBP,5,10,0
DEF456,Allmakes4x4,DEF456,,3.99,20.00,GBP,,,0
DEF456,Britpart,BP-DEF,,4.25,20.00,GBP,10,,1