@if (isset($products) && count($products))
@foreach ($products as $product) @php $hasPromo = $product->hasPromo(); $reviews = $product->getReviewData(); $hasOption = $product->hasOption(); $u = $product->getViewUrl(); $style_attrs = $product->style_attrs ?? []; $downPercent = $product->getDownPercent(); $listPrice = $product->priceFormat('list'); $finalPrice = $product->priceFormat('final'); @endphp
@csrf @if ($product->options) @foreach ($product->options as $opt) @if (!in_array($opt->name, ['color'])) @php $def = null; if ($opt->values) { foreach ($opt->values as $av) { if ($av->is_default) { $def = $av->value_id; } } if (!$def) { $i = 0; foreach ($opt->values as $av) { if ($i == 0) { $def = $av->value_id; } $i++; } } } @endphp @endif @endforeach @endif

{{ $product->name }}

@if ($product->price_status > -1) {{ $finalPrice }} @if ($hasPromo) {{ $listPrice }} @endif @else {{ scw_text('contact') }} @endif
@endforeach
@endif