|
|
@php
$groupImage = $product['GroupImages'][0] ?? null;
$fallbackImage = 'https://via.placeholder.com/80';
$imageUrl =
$groupImage['ThumbnailUrl'] ??
$groupImage['FullUrl'] ??
($product['Images'][0]['ThumbnailUrl'] ?? null) ??
($product['Images'][0]['FullUrl'] ?? null) ??
$fallbackImage;
@endphp
|
{{ $product['Id'] ?? '-' }} |
{{ $product['SKU'] ?? '-' }} |
${{ isset($product['Price']['Value']) ? number_format($product['Price']['Value'], 4) : '-' }}
|
{{ $product['GramWeight'] ?? '-' }}g |
@if (!empty($product['CanBeSetWith']) && isset($product['CanBeSetWith'][0]['Quantity']))
{{ $product['CanBeSetWith'][0]['Quantity'] }}
@else
{{ $product['OnHand']}}
@endif
|
@php
$quality = collect($product['DescriptiveElementGroup']['DescriptiveElements'] ?? [])
->firstWhere('Name', 'Quality');
@endphp
{{ $quality['DisplayValue'] ?? 'N/A' }}
|
{{ $product['ProductType'] ?? '-' }} |
{{ $product['Status'] ?? '-' }} |
{{ isset($product['WebCategories'])
? collect($product['WebCategories'])->pluck('Name')->filter()->unique()->implode(', ')
: 'N/A' }}
|
|
@endforeach