@section('page_slug', 'product') @section('page_title', $product->name) @extends('layout') @section('content')
Accueil > @if($category) @foreach($category->ancestors as $parentCategory) {{$parentCategory->name}} > @endforeach {{$category->name}} > @endif {{$product->name}}

{{$product->name}}

@if($category){{$category->name}} @endif @if($product->ref)#{{$product->ref}}@endif
{{$product->picture->name}}
@if($product->pictures->count() > 0)
@foreach($product->morePictures as $picture)
{{$picture->name}}
@endforeach
@endif
@if($product->description)

{!!$product->description !!}

@endif @if($product->criterions->count() > 0)
@foreach($product->criterions as $criterion)
@if($product->criterions->count() > 1)
{{$criterion->title}}
@endif
@foreach($product->criterionValueList($criterion) as $value)
{{$value}} -
{{--@foreach($product->declinations as $declination) @foreach($declination->where('criterion.name', ) as $criteron) {{$criteron->title}} : {{$criteron->pivot->value}} @endforeach @endforeach--}} @endforeach
@endforeach Il manque une pointure ? prevenez nous
@foreach($product->declinations as $declination) @php $customOffer = null; if(auth()->user()) { $customOffer = auth()->user()->hasCustomOfferForDeclination( $declination ); } @endphp
activeOffers->count() > 0 || $customOffer) @if($declination->lowestOffer->user->isAdmin()) data-premium="1" @endif data-price=" @if($customOffer){{$customOffer->price}}€ @else{{$declination->lowestOffer->price}}€ @endif " @endif @foreach ($declination->criterions as $criterion) data-{{$criterion->slug}}="{{$criterion->pivot->value}}" @endforeach > @foreach ($declination->criterions as $criterion) {{$criterion->slug}} : {{$criterion->pivot->value}}
@endforeach
@if($declination->activeOffers->count() > 0 || $customOffer)
@csrf
@if(auth()->user()) @if(auth()->user()->allowBuyOfferDeposit()) @else {{-- TODO message vous avez déjç posté trop d'offre--}} @endif @else @if(true) Déposer une offre d'achat @endif @endif @else @if(true) Pas d'offre pour le moment
vous voulez vendre la votre ?
Déposer une offre d'achat @endif @endif
@if(auth()->user() && auth()->user()->isSeller()) @else Déposer une offre de vente @endif
@endforeach
@endif
{{----}}
@include('reinsurance', ['page' => 'product'])
@if(auth()->user() && auth()->user()->isSeller()) @endif @if(auth()->user()) @endif
@endsection @section('extra-js') @endsection