@php $translator = app(\App\Services\TranslationService::class); $locale = app()->getLocale(); $translatedName = $translator->translate( $product->product_name, $locale ); $translatedDescription = $translator->translate( strip_tags($product->product_description ?? ''), $locale ); @endphp
@include('front.partials.top-header') @include('front.partials.desktop.search-header') @include('front.partials.sticky-header')
@include('front.partials.mobile.menu')
@if (!request()->is('/'))
@endif

@forelse($product->images as $key => $image)
{{ $translatedName }}
@empty
no image
@endforelse
@forelse($product->images as $key => $image)
{{ $translatedName }}
@empty
no image
@endforelse
@php $firstCategory = mb_strtolower(explode(' → ', $product->final_category)[0] ?? '', 'UTF-8'); @endphp {{ translate_label($firstCategory) }}
@for ($i = 1; $i <= 5; $i++)
@if ($averageRating >= $i) @elseif ($averageRating >= ($i - 0.5)) @else @endif
@endfor {{ $averageRating }} / 5 ({{ $reviewCount }} {{ __('messages.reviews') }})

{{ $translatedName }}

@include('front.partials.report-listing', ['type' => 'product', 'id' => $product->id])
@if($product->reducted_price > 0 && $product->reducted_price < $product->product_price) {{ display_price($product->reducted_price, $product->currency) }} @else {{ display_price($product->product_price, $product->currency) }} @endif @if($product->free_shipping) @include('front.partials.free-shipping-badge', ['style' => 'margin-bottom:15px;']) @endif
@csrf
@foreach($product->variantAttributes() as $variant) @php $type = $variant['type']; $stocks = $variant['stocks']; $translatedType = translate_label(str_replace('_', ' ', $type)); @endphp
{{ $translatedType }}
@foreach($variant['values'] as $index => $value) @php $translatedValue = translate_label($value); $inputId = 'variant_' . $type . '_' . $index; $valueStock = (int) ($stocks[$value] ?? 0); $isOut = $valueStock < 1; $valueColor = $variant['colors'][$value] ?? null; @endphp {{-- pas de for= : l'input est imbriqué, un for redondant déclencherait deux clics --}} @endforeach
@endforeach
{{ __('messages.vendor') }}
{{ $product->seller->name }}
@include('front.partials.private-carrier-picker', ['product' => $product])
{{-- Quantité déjà saisie sur la carte du listing : on la reprend pour que le client n'ait plus qu'à choisir sa déclinaison. --}}
@php $isInWishlist = in_array($product->id, $wishlistProductIds ?? []); @endphp
{{ __('messages.categories_detail_product') }} @foreach(explode('→', $product->final_category) as $category) {{ translate_label(trim($category)) }} @endforeach
{{ __('messages.state_detail_product') }} {{ translate_label($product->etatProduit) }}
{!! nl2br(e($translatedDescription)) !!}
{{-- Récapitulatif des déclinaisons : purement informatif. Le choix se fait dans le formulaire, plus haut. --}} @foreach($product->variantAttributes() as $variant) @php $type = $variant['type']; $translatedType = translate_label(str_replace('_', ' ', $type)); @endphp @endforeach
{{ __('messages.vendor') }} {{ $product->seller->name }}
{{ $translatedType }}
@foreach($variant['values'] as $value) @php $translatedValue = translate_label($value); $valueColor = $variant['colors'][$value] ?? null; @endphp @if($valueColor) @endif {{ $translatedValue }} @endforeach
@include('front.partials.reviews-section', ['reviewAction' => route('product.review.store', $product->id)])
{{ __('messages.what_we_offer') }}
icon

{{ __('messages.what_we_offer_text_1') }}

icon

{{ __('messages.what_we_offer_text_3') }}

icon

{{ __('messages.what_we_offer_text_2') }}

{{ __('messages.guaranteed_safe_checkout') }}
@include('front.partials.footer')