225 lines
13 KiB
PHP
225 lines
13 KiB
PHP
@extends('layouts.layout',['brParam' => $product])
|
||
|
||
@section('title', $product->name)
|
||
|
||
@section('breadcrumb', request()->route()->getName())
|
||
|
||
@section('content')
|
||
|
||
<div class="product-page product">
|
||
<div class="product__wrapper wrapper">
|
||
<div class="product__wrapper-inner wrapper-inner">
|
||
<div class="flex-row">
|
||
<div class="flex-row__block">
|
||
<div class="product__block">
|
||
<div class="block-about">
|
||
<h1 class="block-about__title block-about__title_desktop title">{{ $product->name }}</h1>
|
||
<div class="block-about__description description">
|
||
{!! $product->description !!}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="product__info">
|
||
<div class="product__info-weight">Poids : {{ $product->weight }} {{ $product->weight_unit }}</div>
|
||
@if(!empty($product->foodProduct->servings))
|
||
<div class="product__info-qty">Nombre de portions : {{ $product->foodProduct->servings ?? '' }}</div>
|
||
@endif
|
||
@if(!empty($product->anifoodProduct->servings))
|
||
<div class="product__info-qty">Nombre de portions : {{ $product->anifoodProduct->servings ?? '' }}</div>
|
||
@endif
|
||
</div>
|
||
@if(!empty($product->garmentProduct->size) || !empty($product->garmentProduct->color))
|
||
<div class="product__info">
|
||
@if(!empty($product->garmentProduct->size))
|
||
<div class="">Taille : {{ $product->garmentProduct->size ?? '' }}</div>
|
||
@endif
|
||
@if(!empty($product->garmentProduct->color))
|
||
<div class="">Couleur : {{ $product->garmentProduct->color ?? '' }}</div>
|
||
@endif
|
||
</div>
|
||
@endif
|
||
@if(!empty($product->garmentProduct->material))
|
||
<div class="product__info">
|
||
@if(!empty($product->garmentProduct->material))
|
||
<div class="">Matière : {{ $product->garmentProduct->material ?? '' }}</div>
|
||
@endif
|
||
</div>
|
||
@endif
|
||
<div class="product__trade">
|
||
<div class="product__price pl-item__prices">
|
||
<span class="product__price title title_small mb0">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
|
||
@if($product->promotions->count())
|
||
<div class="pl-item__price price_barred">@fmt_currency($product->priceTtc) @fmt_sellunit($product->sell_unit)</div>
|
||
@endif
|
||
</div>
|
||
@can('addToCart',$product)
|
||
<div class="product__qty">
|
||
<span class="product__qty-btn product__qty-btn_minus" @click="function(){if (num > 0) {num--}}">-</span>
|
||
<input class="product__qty-input form__input" type="text" value="1" name="product_qty" id="product_qty" v-model="num">
|
||
<span class="product__qty-btn product__qty-btn_plus" @click="num++">+</span>
|
||
</div>
|
||
<div class="product__btn-wrap">
|
||
<button class="product__add2cart btn" @click="addtocart({{ $product->id }},num)">ajouter au panier</button>
|
||
</div>
|
||
@endcan
|
||
@cannot('addToCart',$product)
|
||
@php
|
||
$response = Gate::inspect('addToCart',$product);
|
||
@endphp
|
||
<div class="product__qty"></div>
|
||
<div class="product__notavailable">
|
||
{{ $response->message() }}
|
||
</div>
|
||
@endcan
|
||
</div>
|
||
|
||
|
||
<div class="product__accordeon accordeon">
|
||
@if(!empty($product->foodProduct->ingredients))
|
||
<div class="accordeon-block">
|
||
<div class="accordeon-block__title">
|
||
<span class="accordeon-block__title-text title title_xs">Ingrédients</span>
|
||
<span class="accordeon-block__title-arrow"></span>
|
||
</div>
|
||
<div class="accordeon-block__content">
|
||
<div class="accordeon-block__content-inner description">
|
||
{!! $product->foodProduct->ingredients ?? '' !!}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if(!empty($product->anifoodProduct->composition))
|
||
<div class="accordeon-block">
|
||
<div class="accordeon-block__title">
|
||
<span class="accordeon-block__title-text title title_xs">Composition</span>
|
||
<span class="accordeon-block__title-arrow"></span>
|
||
</div>
|
||
<div class="accordeon-block__content">
|
||
<div class="accordeon-block__content-inner description">
|
||
{!! $product->anifoodProduct->composition ?? '' !!}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if (!empty($product->foodProduct->allergens))
|
||
<div class="accordeon-block">
|
||
<div class="accordeon-block__title">
|
||
<span class="accordeon-block__title-text title title_xs">Allergenes</span>
|
||
<span class="accordeon-block__title-arrow"></span>
|
||
</div>
|
||
<div class="accordeon-block__content">
|
||
<div class="accordeon-block__content-inner description">
|
||
{!! $product->foodProduct->allergens !!}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if (!empty($product->foodProduct->nv_kj))
|
||
<div class="accordeon-block">
|
||
<div class="accordeon-block__title">
|
||
<span class="accordeon-block__title-text title title_xs">Valeurs nutritionnelles</span>
|
||
<span class="accordeon-block__title-arrow"></span>
|
||
</div>
|
||
<div class="accordeon-block__content">
|
||
<div class="accordeon-block__content-inner description">
|
||
{{-- nutrivalues --}}
|
||
<div class="tab-content">
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<th></th>
|
||
<th>Pour {{ $product->foodProduct->nv_ref_weight_g }}g</th>
|
||
</tr>
|
||
<tr>
|
||
<td>Énergie</td>
|
||
<td>{{ $product->foodProduct->nv_kj }} Kj<br>{{ $product->foodProduct->nv_kcal }} Kcal</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Matières Grasses<br><span>dont Acides Gras Saturés</span></td>
|
||
<td>{{ $product->foodProduct->nv_fat_g }} g<br>{{ $product->foodProduct->nv_sat_fat_g }} g</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Glucides<br><span>dont sucres</span></td>
|
||
<td>{{ $product->foodProduct->nv_carb_g }} g<br>{{ $product->foodProduct->nv_sugar_g }} g</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Fibres alimentaires</td>
|
||
<td>{{ $product->foodProduct->nv_fiber_g }} g</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Protéines</td>
|
||
<td>{{ $product->foodProduct->nv_protein_g }} g</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Sel</td>
|
||
<td>{{ $product->foodProduct->nv_salt_g }} g</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p class="legende marge">*Apports Quotidien de référence pour un adulte (8400kj/2000kcal).</p>
|
||
<p class="legende">Déjeuner et dîner devraient respectivement couvrir 40 à 30% de vos besoins journaliers.</p>
|
||
<p class="legende">Ces données sont fournies à titre indicatif et peuvent être susceptibles d’évoluer.</p>
|
||
<p class="legende">Seules les valeurs fournies sur l’emballage du produit font foi.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if(!empty($product->foodProduct->preparation))
|
||
<div class="accordeon-block">
|
||
<div class="accordeon-block__title">
|
||
<span class="accordeon-block__title-text title title_xs">Conseils de préparation et dégustation</span>
|
||
<span class="accordeon-block__title-arrow"></span>
|
||
</div>
|
||
<div class="accordeon-block__content">
|
||
<div class="accordeon-block__content-inner description">
|
||
{!! $product->foodProduct->preparation ?? '' !!}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="flex-row__block">
|
||
<div class="product__block">
|
||
<h1 class="block-about__title block-about__title_mobile title">{{ $product->name }}</h1>
|
||
<div class="product__image">
|
||
@if(isset($product->picture_large))
|
||
<img src="{{ asset('/images/produits/' . $product->picture_large )}}">
|
||
@elseif(isset($product->picture))
|
||
<img src="{{ asset('/images/produits/' . $product->picture )}}" />
|
||
@else
|
||
<img src="{{ asset(config('app.theme').'/img/pl_nophoto.png')}}">
|
||
@endif
|
||
</div>
|
||
|
||
<div class="product-benefits">
|
||
{{--<div class="product-benefits__title title title_xs">Vous avez raison de faire confiance à nos produits...</div>
|
||
<div class="product-benefits__list">
|
||
<div class="product-benefits__item">
|
||
<div class="product-benefits__item-image"><img src="{{ asset(config('app.theme').'/img/p-benefit_1.png') }}"></div>
|
||
<div class="product-benefits__item-text">Cuisiné en France</div>
|
||
</div>
|
||
<div class="product-benefits__item">
|
||
<div class="product-benefits__item-image"><img src="{{ asset(config('app.theme').'/img/p-benefit_2.png') }}"></div>
|
||
<div class="product-benefits__item-text">Volaille française</div>
|
||
</div>
|
||
<div class="product-benefits__item">
|
||
<div class="product-benefits__item-image"><img src="{{ asset(config('app.theme').'/img/p-benefit_3.png') }}"></div>
|
||
<div class="product-benefits__item-text">100% sans additifs</div>
|
||
</div>
|
||
</div>--}}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@if($product->products->count())
|
||
@include('partials.products-related')
|
||
@endif
|
||
|
||
{{-- <h1>Produit "{{$product->name}}"</h1> --}}
|
||
@endsection
|