@php $favoriteIds = array_map('intval', (array) session('favorites', [])); $compareIds = array_map('intval', (array) session('compare', [])); $isFavorite = in_array($product->id, $favoriteIds, true); $isCompared = in_array($product->id, $compareIds, true); $cartItems = (array) session('cart', []); $isInCart = isset($cartItems[$product->id]); @endphp
@csrf
@csrf
@if (!empty($product->image_url)) {{ $product->name }} @else @endif

{{ $product->name }}

@if (!empty($product->short_description))

{{ __($product->short_description) }}

@endif
{{ number_format($product->price, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }} @if (!empty($product->old_price)) {{ number_format($product->old_price, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }} @endif
@if ($product->stock > 0)
@csrf
@else @endif