{{-- ── Tabs ──────────────────────────────────────────────────────────────── --}}
{{-- ══════════════════════ SEARCH TAB ════════════════════════════════════ --}} @if($activeTab === 'search') {{-- Filter bar --}}
Search @if($searched) Clear @endif
@if($searched) @php $totalCount = count($results) + count($localResults); @endphp @if($totalCount === 0)
No products matched your search. Try a broader term or remove filters.
@else {{-- ── Turn14 / International Warehouse results ──────────────────────── --}} @if(!empty($results))
@foreach($results as $row) @php $rowId = $row['id']; @endphp {{-- Photo --}} {{-- Part # / Name --}} {{-- Stock (3 rows like PS) --}} {{-- Price --}} {{-- Link --}} @endforeach
Photo Part # / Name Stock Price Link
@if($row['image_url']) @else
@endif
{{ $row['part_number'] }} @if($row['mfr_part_number'] && $row['mfr_part_number'] !== $row['part_number']) Mfr: {{ $row['mfr_part_number'] }} @endif @if($row['brand_name']) {{ $row['brand_name'] }} @endif
{{ $row['product_name'] }}
@if($row['part_description'] && $row['part_description'] !== $row['product_name'])
{{ Str::limit($row['part_description'], 100) }}
@endif @if($row['discontinued']) Discontinued @endif
@include('filament.pages.product-searcher-stock-block', ['row' => $row]) @if(isset($livePrices[$rowId])) @if(isset($livePrices[$rowId]['error']))
{{ $livePrices[$rowId]['error'] }}
@elseif(!$livePrices[$rowId]['usd'])
No price available
@else
{{ $livePrices[$rowId]['formatted'] }}
{{ $livePrices[$rowId]['excl'] ?? '' }}
USD {{ $livePrices[$rowId]['usd'] }} cost
@endif @elseif($row['is_por']) Price on Request
@else @if($row['price_zar_incl'] !== null)
R {{ number_format($row['price_zar_incl'], 2) }} incl.
@if($row['price_zar_excl'] !== null)
R {{ number_format($row['price_zar_excl'], 2) }} excl.
@endif @else — @endif @endif
@if($row['product_url'])
Open
@endif
@if(count($results) === 200)
Showing first 200 matches — narrow your search for more precise results.
@endif
{{-- /x-collapse --}}
@endif {{-- ── Local Products results ──────────────────────────────────────────── --}} @if(!empty($localResults))
@foreach($localResults as $row) @endforeach
Photo SKU / Name Stock Price (incl.) Link
@if($row['image_url']) @else
@endif
@if($row['sku']) {{ $row['sku'] }} @endif
{{ $row['product_name'] }}
@if($row['stock_qty'] > 0) {{ $row['stock_qty'] }} on hand @else Out of stock @endif R {{ number_format($row['price_incl'], 2) }}
Open
{{-- /x-collapse --}}
@endif @endif {{-- totalCount > 0 --}} @else
Enter a part number, product name, manufacturer reference, or description above and press Search.
@endif @endif {{-- search tab --}} {{-- ══════════════════════ BULK TAB ══════════════════════════════════════ --}} @if($activeTab === 'bulk')

One per line or comma-separated. Also matches manufacturer references. Maximum 200.

Look Up @if($bulkRan) Clear @endif
@if($bulkRan && !empty($bulkResults))
{{ count($bulkResults) }} searched {{ collect($bulkResults)->where('not_found', false)->count() }} found @if(collect($bulkResults)->where('not_found', true)->count() > 0) {{ collect($bulkResults)->where('not_found', true)->count() }} not found @endif
@foreach($bulkResults as $row) @php $rowId = $row['id']; @endphp @endforeach
Part # / Name Stock Price Link
@if($row['not_found']) {{ $row['part_number'] }}
Not found in catalogue
@else
{{ $row['part_number'] }} @if($row['mfr_part_number'] && $row['mfr_part_number'] !== $row['part_number']) Mfr: {{ $row['mfr_part_number'] }} @endif @if($row['brand_name']) {{ $row['brand_name'] }} @endif
{{ $row['product_name'] }}
@if($row['discontinued']) Discontinued @endif @endif
@if(!$row['not_found']) @include('filament.pages.product-searcher-stock-block', ['row' => $row]) @endif @if(!$row['not_found']) @if(isset($livePrices[$rowId])) @if(isset($livePrices[$rowId]['error']))
{{ $livePrices[$rowId]['error'] }}
@elseif(!$livePrices[$rowId]['usd'])
No price available
@else
{{ $livePrices[$rowId]['formatted'] }}
{{ $livePrices[$rowId]['excl'] ?? '' }}
USD {{ $livePrices[$rowId]['usd'] }} cost
@endif @elseif($row['is_por']) POR
@else @if($row['price_zar_incl'] !== null)
R {{ number_format($row['price_zar_incl'], 2) }} incl.
@if($row['price_zar_excl'] !== null)
R {{ number_format($row['price_zar_excl'], 2) }} excl.
@endif @else — @endif @endif @endif
@if(!$row['not_found'] && $row['product_url'])
Open
@endif
@endif @endif {{-- bulk tab --}}
@push('scripts') @endpush