@if($hotPicks->count() > 0)

Today's Hot Picks

@foreach($hotPicks as $product) @php $sizeOrder = ['XS', 'S', 'M', 'L', 'XL']; $inStock = $product->variants->where('in_stock', true); $allColors = $inStock->whereNotNull('color_code')->unique('color_code')->take(6); $allSizes = $inStock->whereIn('size', $sizeOrder) ->unique('size') ->sortBy(fn($v) => array_search($v->size, $sizeOrder)) ->values(); $minPrice = $inStock->min('price'); $maxPrice = $inStock->max('price'); @endphp
SALES

{{$product->category->title}}

id) }}'> {{ $product->title }}
@if($minPrice && $maxPrice) @if($minPrice == $maxPrice) ${{ number_format($minPrice, 2) }} @else ${{ number_format($minPrice, 2) }} – ${{ number_format($maxPrice, 2) }} @endif @else — @endif
@if($allColors->count() > 0)
@foreach($allColors as $color)
@endforeach
@endif

Sold:

0

Available:

200

@endforeach
@endif