Status
{{ $p->web_scrape_status ?? 'Not scraped' }}
@if($p->web_scraped_at)
Scraped At
{{ $p->web_scraped_at->format('d M Y H:i') }}
@endif
@if($p->web_product_url)
@endif
@if($webImgs->count())
@php
$lightboxImages = $webImgs->values()->map(function ($i) {
$url = $i['r2_key']
? \Illuminate\Support\Facades\Storage::disk('r2')->url($i['r2_key'])
: $i['filename'];
return ['url' => $url, 'seq' => $i['sequence'], 'onR2' => (bool) $i['r2_key']];
})->toJson();
$r2Count = $webImgs->whereNotNull('r2_key')->count();
@endphp
Images ({{ $webImgs->count() }}){{ $r2Count ? ' · ' . $r2Count . ' on R2' : '' }}
@foreach($webImgs->values() as $i => $img)
@php
$thumbSrc = $img['r2_key']
? \Illuminate\Support\Facades\Storage::disk('r2')->url($img['r2_key'])
: $img['filename'];
@endphp
@endforeach
{{-- Lightbox overlay --}}
{{-- Counter (top-centre of overlay) --}}
/ {{ $webImgs->count() }}
@if($webImgs->count() > 1)
‹
@endif
{{-- Image + close button anchored to its top-right corner --}}
×
@if($webImgs->count() > 1)
›
@endif
@endif
@if($p->web_scrape_error)
Scrape Error
{{ $p->web_scrape_error }}
@endif
@if($p->web_raw_json)
@php
$wd = is_array($p->web_raw_json) ? $p->web_raw_json : (json_decode($p->web_raw_json, true) ?? []);
@endphp
{{-- ── Product Page ── --}}
@if(!empty($wd['product_type']) || !empty($wd['subtitle']) || !empty($wd['breadcrumb']) || !empty($wd['compatibility']))
Product Page
@if(!empty($wd['product_type']))
Product Type
{{ ucfirst($wd['product_type']) }}
@endif
@if(!empty($wd['subtitle']))
Subtitle
{{ $wd['subtitle'] }}
@endif
@if(!empty($wd['breadcrumb']))
Breadcrumb
{{ implode(' › ', $wd['breadcrumb']) }}
@endif
@if(!empty($wd['compatibility']))
Compatible With
{{ implode(', ', $wd['compatibility']) }}
@endif
@endif
{{-- ── Functions ── --}}
@if(!empty($wd['description']) || !empty($wd['features']))
Functions
@if(!empty($wd['description']))
Description
{{ $wd['description'] }}
@endif
@if(!empty($wd['features']))
Features
@foreach($wd['features'] as $feat)
{{ $feat }}
@endforeach
@endif
@if(!empty($wd['performance_features']))
Performance Features
@foreach($wd['performance_features'] as $pf)
{{ $pf['name'] ?? '' }}
@if(!empty($pf['description'])) — {{ $pf['description'] }}@endif
@endforeach
@endif
@endif
{{-- ── Utilisation ── --}}
@if(!empty($wd['applications']))
Utilisation
@foreach($wd['applications'] as $app)
{{ $app }}
@endforeach
@endif
{{-- ── Scope of Delivery ── --}}
@if(!empty($wd['contains']))
Scope of Delivery
@foreach($wd['contains'] as $item)
@php
$containsImg = !empty($item['r2_key'])
? \Illuminate\Support\Facades\Storage::disk('r2')->url($item['r2_key'])
: ($item['image_url'] ?? null);
@endphp
@if($containsImg)
@endif
{{ $item['name'] ?? '' }}
@if(!empty($item['subtitle']))
{{ $item['subtitle'] }}
@endif
@if(!empty($item['r2_key']))
✓ R2
@endif
@endforeach
@endif
{{-- ── Compare Sets ── --}}
@if(!empty($wd['compare_sets']['variants']))
@php
$cs = $wd['compare_sets'];
$variants = $cs['variants'];
$includes = $cs['includes'] ?? [];
@endphp
Set Comparison
{{-- Variant header cards --}}
@foreach($variants as $v)
@php $isCurrent = ($v['sku'] ?? '') === $p->product_number; @endphp
{{ $v['name'] ?? $v['sku'] }}
@if(!empty($v['price']))
{{ $v['price'] }}
@endif
@if($isCurrent)
this product
@endif
@endforeach
{{-- Includes table --}}
@if(count($includes))
Item
@foreach($variants as $v)
{{ $v['name'] ?? $v['sku'] }}
@endforeach
@foreach($includes as $item)
{{ $item['name'] }}
@if(!empty($item['subtitle']))
{{ $item['subtitle'] }}
@endif
@foreach($variants as $v)
@php $incl = in_array($v['sku'] ?? '', $item['included_in'] ?? []); @endphp
@if($incl)
✓
@else
–
@endif
@endforeach
@endforeach
@endif
@endif
{{-- ── Technical Data ── --}}
@if(!empty($wd['technical_data']))
Technical Data
@php
$techRows = $wd['technical_data'];
$isAssoc = array_keys($techRows) !== range(0, count($techRows) - 1);
@endphp
@if($isAssoc)
{{-- Legacy flat object format --}}
@foreach($techRows as $key => $val)
{{ $key }}
{{ $val }}
@endforeach
@else
{{-- New array-of-objects format with section grouping --}}
@php
$sections = collect($techRows)->groupBy('section');
@endphp
@foreach($sections as $sectionName => $rows)
@if($sectionName)
{{ $sectionName }}
@endif
@foreach($rows as $row)
{{ $row['label'] }}
{{ $row['value'] }}
@endforeach
@endforeach
@endif
@endif
{{-- ── Downloads ── --}}
@if(!empty($wd['downloads']))
Downloads
@endif
{{-- ── Highlights ── --}}
@if(!empty($wd['highlights']))
Highlights
@foreach($wd['highlights'] as $hl)
@php
$hlImg = !empty($hl['r2_key'])
? \Illuminate\Support\Facades\Storage::disk('r2')->url($hl['r2_key'])
: ($hl['image_url'] ?? null);
@endphp
@if($hlImg)
@endif
{{ $hl['title'] }}
@if(!empty($hl['description']))
{{ $hl['description'] }}
@endif
@endforeach
@endif
{{-- ── Videos ── --}}
@if(!empty($wd['videos']))
Videos
@endif
{{-- ── 360° View ── --}}
@if(!empty($wd['orbitvu_360_url']))
360° View
@endif
{{-- ── Suitable Accessories ── --}}
@if(!empty($wd['suitable_accessories']))
Suitable Accessories
@foreach($wd['suitable_accessories'] as $item)
@php $skuVal = is_array($item) ? ($item['sku'] ?? null) : $item; @endphp
@if($skuVal)
{{ $skuVal }}
@endif
@endforeach
@endif
{{-- ── This Might Also Interest You ── --}}
@if(!empty($wd['related_products']))
This Might Also Interest You
@foreach($wd['related_products'] as $item)
@php $skuVal = is_array($item) ? ($item['sku'] ?? null) : $item; @endphp
@if($skuVal)
{{ $skuVal }}
@endif
@endforeach
@endif
@endif