@php $showAddToCart = $showAddToCart ?? true; $url = $product->slug ? route('storefront.product', ['slug' => $sfStore->slug, 'product_slug' => $product->slug]) : route('storefront.product.legacy', ['slug' => $sfStore->slug, 'id' => $product->id]); $quickViewUrl = route('storefront.product.quick-view', ['slug' => $sfStore->slug, 'id' => $product->id]); $thumb = $product->thumbnail ? asset('storage/' . $product->thumbnail) : null; $initial = strtoupper(\Illuminate\Support\Str::substr($product->name, 0, 1)); @endphp
@if($thumb) {{ $product->name }} @else @endif
@if($product->category) {{ $product->category->name }} @endif

{{ $product->name }}

{{ $product->formatted_price }}
@if($showAddToCart && !($product->is_variant && $product->variants->isNotEmpty()))
@csrf
@elseif($showAddToCart) @endif
@if($showAddToCart && ($product->is_variant && $product->variants->isNotEmpty()))
@endif