variables in blades : home, product, basket, sales/crecap, partials/tunnel-actions, partials/tunnel-stepper, sales/pick-slot, sales/confirm, add to cart buttons

This commit is contained in:
Olivier Legat 2022-10-06 12:26:13 +02:00
parent 0414de8996
commit e0fbca33e8
21 changed files with 660 additions and 916 deletions

View file

@ -30,7 +30,7 @@ class OrderTunnelController extends Controller
*/
public function recapOrder()
{
$activestep = 2;
$activestep = 1;
Cart::instance('panier');
$cart = Cart::content();
@ -136,7 +136,7 @@ class OrderTunnelController extends Controller
*/
public function timeSlotPick(string $reference)
{
$activestep = 3;
$activestep = 2;
/*
* Il faut diriger les salariés vers le bon magasin sans leur
@ -402,7 +402,7 @@ class OrderTunnelController extends Controller
*/
public function confirmOrder(string $reference)
{
$activestep = 4;
$activestep = 3;
$idcommande = Session::get('idcommande');
$order = Order::where('reference', '=', $reference)->firstOrFail();

View file

@ -20,7 +20,7 @@
</div>
</article>
<main class="container my-4" data-bs-spy="scroll" data-bs-target="#navbar" data-bs-smooth-scroll="true">
<main class="container my-4" data-bs-spy="scroll" data-bs-target="#navbar" data-bs-smooth-scroll="true" class="vue-apps">
<!-- PROMOTIONS OU MISE EN AVANT OU SELECTION DU MOMENT -->
<article id="promotions" class="text-center">
@ -33,24 +33,22 @@
<div class="col-md-4 p-0 w-100">
<div class="position-relative w-75 w-md-100 mx-auto">
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none">bientôt disponible</p>
<img src="{{ asset("/images/produits/" . $product->picture) }}" class="img-fluid" alt="...">
<img src="{{ asset("/images/produits/" . $product->picture) }}" class="img-fluid" alt="{{$product->name}}">
</div>
<div class="card-body d-flex flex-column justify-content-center align-items-center px-3">
<h5 class="font-Barlow-bold m-2">{{ $product->name }}</h5>
<h5 class="font-Barlow-bold m-2"><a class="stretched-link" href="{{route('product', $product->slug)}}">{{$product->name}}</a></h5>
<p class="m-0">{!! $product->description !!}</p>
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold m-2 m-lg-4">
@if ($product->promotions->count())
<span class="card-price-original text-red position-relative me-2">5,99€</span>
<span class="card-price-original text-red position-relative me-2">@fmt_currency($product->priceTtc)</span>
@endif
<span class="card-price-new h3">3,99€</span>
<span class="card-price-new h3">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
</div>
<div class="card-action d-flex justify-content-center justify-content-lg-between align-items-center w-100">
<img class="card-action-nutriscore d-none d-lg-block" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-1.png") }}">
<div class="btn btn-product d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn text-white p-1">-</span>
<span>1</span>
<span class="btn text-white p-1">+</span>
</div>
@can('addToCart', $product)
<basket-buttons :product-id='{{$product->id}}'></basket-buttons>
@endcan
</div>
</div>
</div>
@ -80,7 +78,7 @@
<div class="card-body h-100 d-flex flex-column justify-content-center align-items-center align-items-md-start mx-md-2">
<h5 class="font-Barlow-extra-bold">{{ $quickorder_range->name }}</h5>
<p class="text-center text-md-start">{!! $quickorder_range->description !!}</p>
<a href="#" class="btn btn-product text-white rounded-4">Voir le rayon</a>
<a href="#{{-- passer un parametre pour ouvrir --}}" class="btn btn-product text-white rounded-4">Voir le rayon</a>
</div>
</div>
<div class="filtre position-absolute bottom-0 start-0 w-100 h-75 rounded-4"></div>
@ -88,7 +86,7 @@
</div>
@endforeach
</div>
<a href="#" class="btn btn-section font-Barlow-extra-bold text-uppercase rounded-4 w-75">voir tous les rayons</a>
<a href="{{ route('products') }}" class="btn btn-section font-Barlow-extra-bold text-uppercase rounded-4 w-75">voir tous les rayons</a>
</article>
<article id="services" class="text-center">

View file

@ -1,12 +1,15 @@
import Axios from 'axios';
import Vue from 'vue';
import Vuex from 'vuex';
import VueContentPlaceholders from 'vue-content-placeholders';
import Toastify from "toastify-js";
import '../../../../../node_modules/@fortawesome/fontawesome-free/js/all.min.js';
import { LdcwebCn } from "./vendor/ldcweb-cookies.js";
import './utilities/bootstrap';
import './utilities/swiper';
import './utilities/simplebar';
import './fo/app';
import './fo/cart';
// Ldcweb cookies
window.LdcwebCn = LdcwebCn;
@ -14,8 +17,73 @@ window.LdcwebCn = LdcwebCn;
Vue.use(VueContentPlaceholders)
Vue.component('filter-component', require('./components/FilterComponent.vue').default);
Vue.use(Vuex);
Vue.component('timeslot-picker', require('./components/TimeSlotPicker.vue').default);
Vue.component('basket-panel', require('./components/BasketPanel.vue').default);
Vue.component('quick-order', require('./components/QuickOrder.vue').default);
Vue.component('basket-counter', {
computed: {
count() {
return this.$store.state.cartTotals.countItems;
}
},
mounted: function() {
console.log('Basket Counter Component mounted.');
},
template: '<span class="header-actions__item-icon icon icon_cart"><span class="icon__count">{{ count }}</span></span>'
});
Vue.component('basket-amount', {
computed: {
amount() {
return this.currencyFormatter(this.$store.state.cartTotals.totalTTC);
}
},
mounted: function() {
console.log('Basket Amount Component mounted.');
},
methods: {
currencyFormatter(num) {
if (isNaN(num)) {
return num;
}
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(num);
}
},
template: '<span>{{ amount }}</span>'
});
Vue.component('basket-buttons', require('./components/BasketButtons.vue').default);
const store = new Vuex.Store({
state: {
panier: {},
cartTotals: {},
},
mutations: {
Reload (state,payload) {
state.reload = payload.reload;
},
updatePanier (state, payload) {
state.panier = payload.panier;
},
updateCartTotals (state, payload) {
state.cartTotals = payload.cartTotals;
},
}
});
window.axios = Axios;
window.Toastify = Toastify;
const app = new Vue({
el: '.vue-apps'
el: '#app',
store,
data: {
num: 1 //for the numeric stepper on product pages
},
methods: {
addtocart(product,qtty) {
console.log('root add');
this.$refs.basketpanel.addtocart(product,qtty);
},
},
});

View file

@ -0,0 +1,58 @@
<template>
<div class="btn-basket">
<div class="btn btn-product d-flex justify-content-around align-items-center rounded-4 btn-basket p-0" v-if="qttyInCart">
<span class="btn text-white p-1" @click="addtocart(productId,-1)">-</span>
<span>{{ qttyInCart }}</span>
<span class="btn text-white p-1" @click="addtocart(productId,1)">+</span>
</div>
<div class="btn btn-product d-flex justify-content-around align-items-center rounded-4 btn-basket p-0 icon-cart-white"
@click="addtocart(productId,1)" v-else>
</div>
</div>
</template>
<script>
export default {
props: {
productId: {
type: Number,
default : 0
},
},
computed: {
panier() { return this.$store.state.panier; },
},
data() {
return {
qttyInCart: 0,
}
},
mounted() {
console.log('Basket Buttons Component mounted.');
},
watch: {
panier() {
this.qttyInCart = this.fetchProductQttyInCart();
},
},
methods: {
addtocart(product,qtty) {
console.log('buttons add')
this.$parent.addtocart(product,qtty);
},
//
fetchProductQttyInCart() {
let foundQtty = 0;
this.panier.forEach(element => {
if(element.cartItem.id == this.productId) {
foundQtty = element.cartItem.qty;
}
});
return foundQtty;
}
}
}
</script>
<style>
</style>

View file

@ -1,371 +1,82 @@
<template>
<div id="basket-panel" class="basket-panel preload">
<div class="basket-panel__mask"></div>
<div id="basket-panel__drawer" class="basket-panel__drawer">
<!-- panier vide -->
<div class="basket-panel--empty" v-show="emptybasket">
<div class="basket-panel__header basket-panel__header--empty">
<button class="basket-panel__close">
<span>Fermer</span>
</button>
</div>
<div class="empty-basket">
<svg id="icon-basket-empty" viewBox="0 0 105 104" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="icon icon-basket-empty">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-97.000000, -158.000000)">
<g transform="translate(0.000000, 106.000000)">
<g transform="translate(24.000000, 24.000000)">
<g transform="translate(64.000000, 0.000000)">
<g transform="translate(9.000000, 28.000000)">
<ellipse fill="#D1D0CF" fill-rule="nonzero" opacity="0.55" cx="66.8073257" cy="99.9229657" rx="31.9939371" ry="3.8088"></ellipse>
<path d="M60.72498,75.7225057 C60.6153257,75.7225057 60.50484,75.7275286 60.3935143,75.7367343 C58.3419203,75.9150845 56.8088142,77.7000529 56.9421803,79.7550615 C57.0755464,81.8100701 58.8265029,83.381909 60.8839399,83.293591 C62.9413768,83.205273 64.5511943,81.4891687 64.5079668,79.4302908 C64.4647393,77.3714129 62.7843108,75.7243895 60.72498,75.7225057 Z" fill="#FEE2A2" fill-rule="nonzero"></path>
<path d="M67.4825143,78.9167 C67.1623695,75.2609992 63.9936654,72.5223307 60.3301407,72.7349996 C56.666616,72.9476685 53.8360896,76.0345943 53.9410992,79.7027838 C54.0461088,83.3709734 57.0485945,86.290917 60.7182857,86.2936571 C60.9149914,86.2936571 61.1142171,86.2852829 61.3142657,86.2677029 C65.0455789,85.9373988 67.8051492,82.6486842 67.4825143,78.9167 L67.4825143,78.9167 Z M60.72498,75.7225057 C62.7822657,75.7244759 64.4609671,77.3699124 64.5041075,79.4267467 C64.5472479,81.483581 62.9390159,83.1979583 60.8836221,83.2861886 C58.8282283,83.3744189 57.0789994,81.8041647 56.9457217,79.7511997 C56.812444,77.6982346 58.3439652,75.9149954 60.3935143,75.7367343 C60.5048571,75.7275286 60.6153257,75.7225057 60.72498,75.7225057 L60.72498,75.7225057 Z" id="Shape" fill="#ff4e4e" fill-rule="nonzero"></path>
<path d="M85.3670057,74.0174257 C85.2565114,74.0174257 85.1460171,74.0216171 85.03386,74.0316543 C82.9819563,74.2100227 81.4485421,75.9951432 81.5817019,78.0504759 C81.7148617,80.1058086 83.465797,81.6781444 85.5235628,81.5902577 C87.5813286,81.502371 89.1918241,79.7864694 89.1492531,77.7272676 C89.1066822,75.6680659 87.4266456,74.0201911 85.3670057,74.0174257 Z" fill="#FEE2A2" fill-rule="nonzero"></path>
<path d="M92.1237,77.21162 C91.8041941,73.5554324 88.6354676,70.8159573 84.9714933,71.0282865 C81.307519,71.2406158 78.4764495,74.3277824 78.5814201,77.9964024 C78.6863908,81.6650224 81.6893508,84.5852592 85.3594714,84.5877371 C85.5561771,84.5877371 85.7553943,84.5793714 85.9554514,84.5617914 C89.6862934,84.2312527 92.4456064,80.9432167 92.1237,77.21162 L92.1237,77.21162 Z M85.3670057,74.0174257 C87.4240987,74.0202982 89.1019847,75.6661962 89.1444478,77.7228528 C89.1869109,79.7795095 87.5783904,81.4932608 85.5231691,81.5810388 C83.4679477,81.6688168 81.7191636,80.0984551 81.5861133,78.0456674 C81.453063,75.9928797 82.9845031,74.2099122 85.03386,74.0316543 C85.146,74.0216171 85.2565114,74.0174257 85.3670057,74.0174257 L85.3670057,74.0174257 Z" id="Shape" fill="#ff4e4e" fill-rule="nonzero"></path>
<path d="M67.9645714,7.97827143 L68.5451057,1.70578571 C68.5973175,1.14173888 68.9464786,0.648392791 69.4610634,0.411586133 C69.9756482,0.174779475 70.577479,0.230488817 71.039852,0.55772899 C71.502225,0.884969162 71.7548947,1.4340246 71.7026829,1.99807143 L71.1221314,8.27054857 C71.0735147,8.83570804 70.7266747,9.33183778 70.2125852,9.5715893 C69.6984957,9.81134082 69.0954891,9.75818287 68.6312728,9.43218895 C68.1670565,9.10619503 67.9123637,8.55703727 67.9633714,7.99208857 L67.96464,7.97832286 L67.9645714,7.97827143 Z" fill="#FFCCBD" fill-rule="nonzero"></path>
<path d="M77.1094286,9.90088571 L80.0137371,4.31104571 C80.4184016,3.53584377 81.3742995,3.23463343 82.1502783,3.63780618 C82.9262571,4.04097894 83.2293053,4.99629581 82.8276257,5.77304857 L79.9233086,11.36288 C79.5193836,12.1395112 78.5624792,12.4418306 77.7856784,12.038232 C77.0088777,11.6346333 76.7061562,10.677856 77.1094286,9.90088571 Z" fill="#FFCCBD" fill-rule="nonzero"></path>
<path d="M60.72294,10.45958 C60.3205914,10.5816972 59.8862111,10.53898 59.5153582,10.3408257 C59.1445053,10.1426714 58.8675584,9.80531194 58.7454429,9.40296286 L58.7453743,9.40272286 L56.9163857,3.37478 C56.6650774,2.53782893 57.1383473,1.65532818 57.9745681,1.40160026 C58.8107888,1.14787235 59.6946547,1.618588 59.9508,2.45407143 L61.7797886,8.48202286 C62.034079,9.31986789 61.5610158,10.2052189 60.7231714,10.4595114 L60.72294,10.45958 Z" fill="#FFCCBD" fill-rule="nonzero"></path>
<path d="M54.5468057,13.72802 C54.2405639,14.0161422 53.8324087,14.1708093 53.4121299,14.1579963 C52.991851,14.1451832 52.5938758,13.9659396 52.3057543,13.6596971 L52.3055914,13.6595257 L47.9894743,9.07124 C47.3939486,8.43281183 47.4266116,7.4330694 48.0625396,6.83487461 C48.6984676,6.23667983 49.6983381,6.26515479 50.2991914,6.89857143 L54.6153086,11.4868571 C55.215283,12.1245712 55.18469,13.1279157 54.5469771,13.7278914 L54.5468057,13.72802 Z" fill="#FFCCBD" fill-rule="nonzero"></path>
<path d="M102.496466,20.7774714 C101.176696,19.3739105 99.2874161,18.6511315 97.3678371,18.81542 L36.4152771,23.8871429 C34.0360432,24.0735451 31.8918619,25.3934501 30.6538371,27.4337429 C30.6421114,27.4521543 30.6312343,27.4706 30.6203486,27.4889857 L29.7774429,25.4336 L26.0985857,17.40584 C24.8631842,14.3865739 22.4304508,12.0152173 19.3806086,10.8573543 C19.2355106,9.29582331 18.1587245,7.97791436 16.6574657,7.52442286 L5.43926571,4.14396286 C3.39963316,3.52911608 1.24775249,4.68413316 0.632905714,6.72376571 C0.018058937,8.76339827 1.17307602,10.9152789 3.21270857,11.5301257 L14.4309,14.91056 C15.895449,15.3549549 17.4839357,14.8842165 18.4698943,13.7136286 C20.6902631,14.6144705 22.4502183,16.377494 23.3471914,18.5994286 L27.0260486,26.6271886 L29.92812,33.7078229 C29.9808514,33.8647714 30.0386057,34.0207429 30.1013829,34.1757371 L31.3787314,37.3105057 C31.4133271,37.3949714 31.455343,37.4762036 31.5042857,37.5532486 L42.5433429,64.4833914 C43.6104623,67.1123374 46.1664564,68.8304612 49.0037229,68.8260286 C49.2088029,68.8260286 49.4163857,68.8168143 49.6248171,68.7984029 L93.0561771,64.9990143 C96.2940927,64.7252758 98.9133024,62.2505026 99.3700714,59.0333 L104.150486,26.01572 C104.43193,24.1083549 103.822202,22.177356 102.496466,20.7774714 Z M64.1744657,64.5144629 L54.8674886,25.36238 L80.1663857,23.2572371 L77.8059,63.3219629 L64.1744657,64.5144629 Z M49.3636371,65.81012 C47.6203783,65.9657102 45.979622,64.9656964 45.3189943,63.3449771 L32.7514886,32.6891429 C32.3456441,31.3885638 32.5522698,29.9740603 33.3131857,28.8439176 C34.0741015,27.7137748 35.3069939,26.9902482 36.6647143,26.8770629 L51.8443714,25.6139514 L61.1544943,64.7786429 L49.3636371,65.81012 Z M101.182286,25.5855114 L96.4010314,58.6030829 C96.1399459,60.4404711 94.6442385,61.8539057 92.7950314,62.0107314 L80.8268571,63.0577143 L83.1865114,23.0058971 L97.6189886,21.8049371 C98.6271159,21.7196868 99.6190517,22.0990713 100.312986,22.8353072 C101.006921,23.5715431 101.327014,24.584168 101.182329,25.5854943 L101.182286,25.5855114 Z" fill="#ff4e4e" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
<h2 class="title">Votre panier est vide...</h2>
<!--<div class="cart-item__text">
Besoin d’idées pour commencer ?
</div>
<button class="btn btn_blue">Voir mes achats fréquents</button>
<div class="empty-basket__action">
<button class="btn btn_white">
<span class="">Commencer mes courses</span>
</button>
<button class="btn btn_white">
<span class="">voir les promotions</span>
</button>
</div>-->
</div>
<div id="basket" class="basket-hidden w-100 h-100 position-fixed top-50 start-50 translate-middle">
<div class="basket-preview container-fluid position-absolute top-0 rounded-4">
<div class="d-flex flex-row justify-content-between align-items-center border-bottom pb-2 mx-2 mx-md-4">
<p class="title-small font-Barlow-bold m-0">Aperçu du panier</p>
<button class="btn icon-medium icon-cross"></button>
</div>
<!-- panier en avec produits -->
<div class="basket-panel__header" v-show="!(emptybasket)">
<div class="basket-panel__title-wrapper">
<span class="title title_medium">
Aperçu panier
</span>
</div>
<button id="close-panel" class="basket-panel__close">
<span>Fermer</span>
</button>
</div>
<!-- <div class="message-box" v-show="!(emptybasket)">
<div class="message-box__inner">
<div class="message-box__heading message-box__icon message-box__icon--low">
Vous n’êtes pas connecté
<ul class="list-group rounded-0 px-2 px-md-4" v-show="emptybasket">
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
Votre Panier est vide
</li>
</ul>
<section data-simplebar class="list-group" v-show="!(emptybasket)">
<ul class="list-group rounded-0 px-2 px-md-4">
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3" v-for="item in panier" :key="item.cartItem.id">
<img :src="'/images/produits/'+item.product.picture"
:alt="item.cartItem.name"
:title="item.cartItem.name"
importance="low" class="basket-icon">
<div class="d-flex flex-column justify-content-start align-items-start">
<a class="m-0 font-Barlow-bold"
:href="'/produit/'+item.product.slug"
:title="item.cartItem.name"
target="_self">
{{ item.cartItem.name }}
</a>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">{{ item.product.sell_unit }}</p>
</div>
<div class="message-box__body">
Connectez-vous ou créez votre compte pour passer votre commande
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">{{ currencyFormatter(item.product.calculatedPrices.discountedPriceTtc) }}</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1" @click="addtocart(item.cartItem.id,-1)">-</span>
<span>{{ item.cartItem.qty }}</span>
<span class="btn p-1" @click="addtocart(item.cartItem.id,+1)">+</span>
</div>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0" @click="removeItem(item.cartItem.rowId)">
Suppr
</div>
</div>
<a href="#" target="" class="message-box__alert-title">
</a>
<div class="message-box__actions">
<div><a href="/connexion">
Me connecter
</a> <a href="/inscription">
Créer mon compte
</a></div>
<button class="btn icon-small icon-cross" @click="removeItem(item.cartItem.rowId)"></button>
</li>
</ul>
</section>
<div class="title-small d-flex flex-row justify-content-between align-items-center font-Barlow-bold px-2 px-md-4">
<p>Total</p>
<p>{{currencyFormatter(cartTotals.totalTTC)}}</p>
</div>
<div class="d-flex flex-row justify-content-between align-items-center px-2 px-md-4">
<button class="btn text-uppercase rounded-4" @click="confirmEmpty()">Vider le panier</button>
<a class="btn btn-product text-uppercase font-Barlow-bold rounded-4" href="/commande/recap">
Commander
</a>
</div>
</div>
<div id="empty-basket-modal" class="checkout-clear-basket__modal">
<div class="modal" v-show="showConfirmEmpty">
<div class="modal__container">
<div class="modal__body">
<div class="checkout-clear-basket__modal__title">
Voulez-vous réellement vider votre panier ?
</div>
</div>
</div> -->
<div class="no-slot-alert" v-show="!(emptybasket)">
<!-- show next available collection slot ? -->
</div>
<div class="basket-panel__content basket-panel__content--smooth-scroll" v-show="!(emptybasket)">
<section class="cart-tile cart-tile--open">
<div class="cart-tile__top"></div>
<div>
<div class="cart-tile__header">
<section class="cart-tile__inner-content cart-tile__inner-content-row">
<div class="cart-tile__informations"><svg aria-hidden="true" class="svg-icon svg-icon--l svg-icon--color-interactive-1">
<use xlink:href="#i41"></use>
</svg>
<div class="cart-tile__title">
<!--<h2 class="ds-title cart-tile__title-delivery-mode ds-title--light ds-title--xs ds-title--secondary">
Vendu et préparé par
</h2>
<div class="cart-tile__title-seller">
<h2 class="ds-title ds-title--bold ds-title--s ds-title--secondary">
Carrefour Drive
</h2>
</div>-->
</div>
</div>
</section>
</div>
<div class="cart-tile__warning">
<!-- what is the purpose of this one ? -->
</div>
</div>
<!-- début produits -->
<div class="cart-tile__products">
<div id="basket-available-list" class="basket-summary-list" is-panel="true">
<div class="basket-products-list basket-products-list--without-padding">
<div class="basket-products-list__inner">
<div class="basket-products-list--first">
<div class="category-heading basket-products-list__category" id="boissons">
<!-- gamme
<div class="category-heading__header category-heading__header--collapsable">
<h2 class="category-heading__title title title_xs">
Boissons
</h2>
<div class="category-heading__left-content">
<div class="ds-badge category-heading__badge" data-testid="category-quantity-badge">
1
</div> <span class="ds-chevron category-heading__chevron ds-chevron--s"></span>
</div>
</div>
<!-- fin gamme -->
<div>
<ol>
<!-- boucleproduits -->
<li class="basket-products-list__product-card basket-products-list__product-card--no-margin" v-for="item in panier">
<article class="ds-product-card--largehorizontal ds-product-card">
<div class="ds-product-card--largehorizontal-icons">
<div title="Supprimer" class="product-card-delete" @click="removeItem(item.cartItem.rowId)"></div>
</div>
<div class="ds-product-card--largehorizontal-highlightlabel">
<div class="product-card-highlightlabel product-card-highlightlabel--fid">
<span class="ds-body-text ds-body-text--weight-bold ds-body-text--size-s ds-body-text--color-inherit">
<!-- highlight en tête produit
Avantages fidélité
-->
</span>
</div>
</div>
<div class="ds-product-card--largehorizontal-infos">
<div class="ds-product-card--largehorizontal-infos-main">
<div class="ds-product-card--largehorizontal-left">
<div class="ds-product-card--largehorizontal-image">
<a href="" :title="item.cartItem.name" target="_self" class="product-card-image">
<img :src="'/images/produits/'+item.product.picture"
:alt="item.cartItem.name"
importance="low" class="image product-card-image__image">
</a>
</div>
<div class="ds-product-card--largehorizontal-badges">
<!-- badges (bio, madie inf france etc)
<ul class="product-badges-list">
<li data-flag-id="flag.common.organic" class="product-badges-list__item"><a href="#flag.common.organic" data-testid="product-badge-link" class="product-badge__link product-badge--flag-common.organ product-badge--size-m">
<picture class="product-badge__icon"><img src="/images/badges/flag-common-organic.svg" alt="Produit Bio" importance="low" class="image product-badge__icon__img"></picture> <span class="product-badge__title">Produit Bio</span>
</a></li>
</ul>-->
<div class="ds-format ds-product-card__shimzone--small" v-show="item.cartItem.weight">
{{ item.cartItem.weight }} {{ item.product.weight_unit }}
</div>
</div>
</div>
<div>
<div class="ds-product-card__shimzone--large">
<a :href="'/produit/'+item.product.slug"
:title="item.cartItem.name"
target="_self" class="product-card-title product-card-title__reduced-line-clamp">
<h2 class="ds-title ds-title--medium ds-title--s">
{{ item.cartItem.name }}
</h2>
</a></div>
<!-- unité de vente -->
<div class="ds-product-card__shimzone--medium">
<div class="ds-body-text ds-product-card__packaging ds-body-text--size-s ds-body-text--color-standard-3">
{{ item.product.sell_unit }}
</div>
</div>
<!-- prix au poids/litre
<div class="ds-product-card__shimzone--small">
<div class="ds-body-text ds-product-card__perunitlabel ds-body-text--size-s ds-body-text--color-standard-3">
</div>
</div>
-->
</div>
</div>
<div class="ds-product-card--largehorizontal-infos-sec">
<!-- promotion -->
<div class="ds-product-card--largehorizontal-promotion" v-show="item.product.calculatedPrices.discountAmount>0" v-for="promotion in item.product.promotions">
<div>
<div class="promotion-description promotion-description--loyalty">
<div class="promotion-description__labels" @mouseover="hover('promotion_slide',item.cartItem.rowId)" @mouseleave="hover('promotion_slide','-1')">
<p :title="numFormatter(Math.round(item.product.calculatedPrices.discountRate*100)/100)+' % d\'économies'" class="promotion-label">
<span class="promotion-label__txt">{{ numFormatter(Math.round(item.product.calculatedPrices.discountRate*100)/100) }} % d'économies</span>
</p>
</div>
<svg focusable="false" class="promotion-description__icon-info">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-info"></use>
</svg>
</div>
<section class="promotion-slide" v-show="promotion_slide == item.cartItem.rowId">
<header class="promotion-slide__header promotion-slide__header--loyalty">
<p class="promotion-slide__header-txt">
<svg focusable="false" class="promotion-slide__icon-promo">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-carrefour-loyalty-card-hightlighted"></use>
</svg>
<span class="promotion-slide__header-label">
Economisé
</span>
<span class="promotion-slide__header-discount">
{{ currencyFormatter((Math.round((item.product.calculatedPrices.priceTtc - item.product.calculatedPrices.discountedPriceTtc)*100)/100) * item.cartItem.qty) }}
</span>
</p>
</header>
<p class="promotion-slide__txt"><span><b>{{ numFormatter(Math.round(item.product.calculatedPrices.discountRate*100)/100) }} % d'économies</b><br></span>
<span class="promotion-slide__end-date">Offre valable jusqu'au {{ dateFormatter(promotion.date_end) }}</span>
</p>
</section>
</div>
</div>
<div class="ds-product-card--largehorizontal-pricing">
<div class="product-card-price">
<div class="product-card-price__price"><span class="ds-title product-card-price__price--final ds-title--m product-card-price__discount--fid">
{{ currencyFormatter(item.product.calculatedPrices.discountedPriceTtc) }}
</span>
</div>
</div>
<div class="ds-product-card--largehorizontal-cta">
<div class="product-card-cta">
<div id="data-produit-acheter" class="add-to-cart">
<div class="pl-button-counter add-to-cart__counter">
<button type="button" class="pl-button-counter__action" @click="addtocart(item.cartItem.id,-1)">
<svg aria-hidden="true" class="svg-icon svg-icon--s">
<use xlink:href="#i10"></use>
</svg>
</button>
<div class="pl-button-counter__value">
{{ item.cartItem.qty }}
</div>
<button type="button" class="pl-button-counter__action" @click="addtocart(item.cartItem.id,1)">
<svg aria-hidden="true" class="svg-icon svg-icon--s">
<use xlink:href="#i09"></use>
</svg>
</button>
</div>
</div>
</div>
<div class="promotion-feedback promotion-feedback--no-text promotion-feedback--text-only"><span class="promotion-feedback__content">
</span></div>
</div>
</div>
</div>
</div>
</article>
</li>
<!-- fin boucle produits -->
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="products-brief">
<section class="products-brief__top-section">
</section>
<div class="">
<section class="products-brief__box">
<dl class="products-brief-data products-brief--items">
<dt>
<div class="ds-body-text ds-body-text--size-m">Total produits</div>
</dt>
<dd>
<div class="ds-body-text ds-body-text--weight-bold ds-body-text--size-m">
{{currencyFormatter(cartTotals.totalTTC)}}
</div>
</dd>
</dl>
<div class="products-brief__slot">
<div class="checkout-clear-basket basket-panel__clear-basket">
<div id="data-clear-basket" class="checkout-clear-basket__actions">
<button class="pl-button checkout-clear-basket__cta pl-button--tertiary pl-button--small" @click="confirmEmpty()">
<span class="pl-button__label">
<svg aria-hidden="true" class="checkout-clear-basket__icon svg-icon svg-icon--m svg-icon--color-interactive-1">
<use xlink:href="#i13"></use>
</svg>
Vider le panier
</span>
</button>
</div>
<div id="empty-basket-modal" class="checkout-clear-basket__modal">
<div class="modal" v-show="showConfirmEmpty">
<div class="modal__container">
<div class="modal__body">
<div class="checkout-clear-basket__modal__title">
Voulez-vous réellement vider votre panier ?
</div>
</div>
<div class="modal__action">
<div><button class="ds-button" id="checkout-empty-basket-confirm">
<span class="ds-button__label" @click="emptyCart()">
Oui, vider mon panier
</span>
</button>
<button class="ds-button ds-button--tertiary" id="checkout-empty-basket-cancel">
<span class="ds-button__label">Annuler</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="checkout-loyalty-info" loyalties-desactivated="true" style="display: none;">
<div class="checkout-loyalty-info__loyalty">
<section class="checkout-loyalty-info__top-section">
<h3 class="ds-title ds-title--bold ds-title--xs">
Avantages fidélité
</h3>
</section>
</div>
</div>-->
</section>
</div>
</div>
</div>
<!-- fin profuits-->
<div class="cart-tile__bottom cart-tile__bottom--fixed">
<div class="cart-tile__price">
<h2 class="ds-title ds-title--bold ds-title--s ds-title--bright">
Total
</h2>
<h2 class="ds-title ds-title--bold ds-title--m ds-title--bright">
{{currencyFormatter(cartTotals.totalTTC)}}
</h2>
</div>
<button class="pl-button pl-button--primary pl-button--light">
<a href="/commande/recap">
<span class="pl-button__label">
Commander
</span>
</a>
<div class="modal__action">
<div><button class="ds-button" id="checkout-empty-basket-confirm">
<span class="ds-button__label" @click="emptyCart()">
Oui, vider mon panier
</span>
</button>
<button class="ds-button ds-button--tertiary" id="checkout-empty-basket-cancel">
<span class="ds-button__label">Annuler</span>
</button>
</div>
</section>
</div>
</div>
<!-- fin basket-panel__drawer -->
</div>
<div class="svg-icons-sprites">
<svg id="sprite-defs" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol viewBox="0 0 24 15" id="i41"><path d="M4.27 1.793a16.39 16.39 0 019.445-.375 9.561 9.561 0 014.637 3.517c1.066.375 4.924 1.885 5.32 4.05a4.671 4.671 0 01-.69 3.277.95.95 0 01-.682.376h-1.81a2.916 2.916 0 01-5.361 0H8.416a2.923 2.923 0 01-5.396 0h-.874a1.318 1.318 0 01-.901-.382C.733 11.778.487 10.91.487 9.688a10.066 10.066 0 012.63-7.096c.339-.35.652-.57 1.153-.799zm1.448 8.188a1.557 1.557 0 100 3.115 1.557 1.557 0 000-3.115zm12.088 0a1.557 1.557 0 100 3.115 1.557 1.557 0 000-3.115zm-4.473-7.218a15.024 15.024 0 00-8.94.478 8.817 8.817 0 00-2.54 6.474c-.014 1.257.287 1.55.341 1.591h.628a2.91 2.91 0 015.798 0h6.29a2.902 2.902 0 015.798 0h1.312c.297-.643.404-1.36.307-2.062-.205-1.113-2.827-2.459-4.624-3.053a.683.683 0 01-.362-.287 8.407 8.407 0 00-4.008-3.141z"></path></symbol>
<symbol viewBox="0 0 16 2" id="i10"><path d="M1.197 0C.536 0 0 .448 0 1s.536 1 1.197 1h13.606C15.464 2 16 1.552 16 1s-.536-1-1.197-1H1.197z"></path></symbol>
<symbol viewBox="0 0 16 16" id="i09"><path d="M8 .5c.518 0 .938.502.938 1.122l-.001 5.44h5.441c.578 0 1.055.366 1.115.836L15.5 8c0 .518-.502.938-1.122.938l-5.441-.001v5.441c0 .578-.365 1.055-.835 1.115L8 15.5c-.518 0-.938-.502-.938-1.122V8.937h-5.44c-.578 0-1.055-.365-1.115-.835L.5 8c0-.518.502-.938 1.122-.938h5.44v-5.44c0-.578.366-1.055.836-1.115z"></path></symbol>
<symbol viewBox="0 0 20 24" id="i13"><path d="M18.67 4a1 1 0 01.117 1.993L18.671 6H17.52l-.63 14.85c-.069 1.626-1.192 2.914-2.59 3.008l-.161.005H5.534c-1.418 0-2.591-1.227-2.74-2.827l-.013-.186L2.15 6H1a1 1 0 01-.117-1.993L1 4h17.67zm-3.03 2H4l.626 14.893c.025.588.366 1.038.682 1.1l.073.007h8.88c.31 0 .67-.409.742-.974l.011-.133L15.64 6zM7.71 8c.376-.013.766.293.79.708l.482 8.744a.751.751 0 01-.708.791l-.042.001a.75.75 0 01-.748-.708L7 8.791a.75.75 0 01.708-.79zm4.565 0a.75.75 0 01.708.791l-.483 8.745a.75.75 0 01-.748.708h-.042a.751.751 0 01-.708-.792l.483-8.744c.024-.415.405-.722.79-.708zm.688-8a1 1 0 110 2H6.709a1 1 0 110-2h6.253z"></path></symbol>
</defs>
</svg>
</div>
</div>
</div>
</template>
@ -450,8 +161,6 @@ export default {
this.updateStore(result);
toast.destination = undefined;
Toastify(toast).showToast();
window.toggleFixingBottomCart();
window.openCart();
}
)
.catch(function (error) {
@ -472,8 +181,6 @@ export default {
toast.text = 'Panier mis à jour';
toast.destination = undefined;
Toastify(toast).showToast();
window.toggleFixingBottomCart();
window.openCart();
}
)
.catch(function (error) {
@ -494,7 +201,6 @@ export default {
toast.text = 'Produit retiré de votre panier';
toast.destination = undefined;
Toastify(toast).showToast();
window.toggleFixingBottomCart();
}
)
.catch(function (error) {
@ -540,26 +246,13 @@ export default {
cartTotals: result[1]
});
},
hover(zone,row_id) {
console.log(this.promotion_slide);
eval("this."+zone+"='"+row_id+"';");
console.log(this.promotion_slide);
},
//general purpose TODO : globalize
numFormatter(num) {
return new Intl.NumberFormat('fr-FR', { style: 'decimal', minimumFractionDigits: 2}).format(num);
},
//general purpose
currencyFormatter(num) {
if (isNaN(num)) {
return num;
}
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(num);
},
dateFormatter(str) {
let d=new Date(str);
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
return d.toLocaleDateString("fr-FR",options);
}
}
}
</script>

View file

@ -1,50 +1,40 @@
<template>
<div class="timeslot-container">
<div class="point-relay">
<h2 class="title title_xs">1. Votre point de retrait</h2>
<!--<div class="point-relay__form form">
<input class="form__input" type="text" placeholder="Rechercher une adresse">
<button class="btn btn_blue">OK</button>
<button class="btn">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="34px" height="34px">
<path fill-rule="evenodd" stroke="rgb(255, 255, 255)" stroke-width="2px" stroke-linecap="butt" stroke-linejoin="miter" fill="none" d="M16.500,5.000 C22.851,5.000 28.000,10.149 28.000,16.500 C28.000,22.851 22.851,28.000 16.500,28.000 C10.149,28.000 5.000,22.851 5.000,16.500 C5.000,10.149 10.149,5.000 16.500,5.000 Z" />
<path fill-rule="evenodd" fill="rgb(255, 255, 255)" d="M-0.000,17.000 L-0.000,16.000 L10.000,16.000 L10.000,17.000 L-0.000,17.000 Z" />
<path fill-rule="evenodd" fill="rgb(255, 255, 255)" d="M23.000,17.000 L23.000,16.000 L33.000,16.000 L33.000,17.000 L23.000,17.000 Z" />
<path fill-rule="evenodd" fill="rgb(255, 255, 255)" d="M16.000,10.000 L16.000,-0.000 L17.000,-0.000 L17.000,10.000 L16.000,10.000 Z" />
<path fill-rule="evenodd" fill="rgb(255, 255, 255)" d="M16.000,33.000 L16.000,23.000 L17.000,23.000 L17.000,33.000 L16.000,33.000 Z" />
<path fill-rule="evenodd" stroke="rgb(255, 255, 255)" stroke-width="1px" stroke-linecap="butt" stroke-linejoin="miter" fill="none" d="M16.000,16.000 L17.000,16.000 L16.000,16.000 Z" />
</svg>
</button>
</div>-->
<div class="choices">
<div class="blocks" v-for="magasin in magasins" @click="choosemagasin(magasin.id)" :class="{ active: selectedmagasin == magasin.id }">
<div class="block">
<div class="label title title_small">Point de retrait :</div>
<div class="value title title_small">{{magasin.name}}</div>
</div>
<div class="block">
<div class="label title title_small">Adresse :</div>
<div class="value">{{magasin.address}}<br>{{magasin.postcode}} {{magasin.city}}</div>
</div>
<div class="block">
<div class="label title title_small">Téléphone : </div>
<div class="value">{{magasin.phone}}</div>
</div>
<div class="map">
<iframe :src="magasin.gmaps_embed_href" width="100%" height="225" frameborder="0" style="border:0;" allowfullscreen="" loading="lazy" aria-hidden="false" tabindex="0"></iframe>
<p class="d-none d-lg-block title-regular text-center text-uppercase font-Barlow-extra-bold m-3">Choisissez où et quand retirer votre commande</p>
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small">
<span class="text-green">1.</span>
Votre point de retrait
</h3>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col m-0">
<div class="card card-activate mb-3">
<div class="row bkg-medium-grey shadow rounded-4 g-0 p-3">
<div class="col-4">
<img src="/sable/img/step_1.png" class="img-fluid" alt="...">
</div>
<div class="col-8 d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-regular text-uppercase font-Barlow-extra-bold">{{magasin.name}}</h5>
<p class="card-text font-Barlow-medium m-0">{{magasin.address}}</p>
<p class="card-text font-Barlow-medium m-0">{{magasin.postcode}} {{magasin.city}}</p>
<p class="card-text font-Barlow-medium m-0">{{magasin.phone}}</p>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" :value="selectedmagasin" name="selectedmagasin">
<input type="hidden" :value="selectedmagasin" name="selectedmagasin"></input>
</div>
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small m-3">
<span class="text-green">2.</span>
Choisissez le jour du retrait de votre commande
</h3>
<div class="datetime-collect">
<h2 class="title title_xs">2. Choisissez le jour et l'heure du retrait de votre commande</h2>
<div class="timeslot-pick-wrapper">
<div class="calendar">
<h2><span @click="prevMonth()" v-show="canPrevMonth()"><img src="/ldc/img/chevron_prev.svg"></span>{{ months[currentmonth] }} {{ currentyear }}<span @click="nextMonth()"><img src="/ldc/img/chevron_next.svg"></span></h2>
<header>
<div v-for="day in days">{{ short(day) }}</div>
<div v-for="day in days" :key="day">{{ short(day) }}</div>
</header>
<section class="content">
<div v-for="tile in tiles" :class="style(tile)" @click="showCreneaux(tile)">
@ -52,31 +42,26 @@
</div>
</section>
</div>
<div class="creneaux">
<header>Horaires disponibles le {{selectedDay}}</header>
<section class="creneaux__list" @mousewheel.prevent="wheel">
<div class="scroll-up"
@click="scroll('up')"
@mousedown="scrollStart('up')" @mouseup="scrollStop()"
@mouseleave="scrollStop()" @touchstart="scrollStart('up')"
@touchend="scrollStop()" @touchcancel="scrollStop()"
:class="{active: (this.scrollCounter>0)}"><img src="/ldc/img/chevron_up.svg"></div>
<section class="creneaux__slots" ref="creneaux__slots" :class="{hasDown: (creneaux.length>3 && this.scrollCounter<(creneaux.length/2)), hasUp: (this.scrollCounter>0)}">
<div v-for="(creneau,index) in creneaux" :class="styleCren(creneau)" @click="selectSlot(creneau)" ref="cren" :key="index">
<span>{{creneau.horaire}}</span>
</div>
</section>
<div class="scroll-down"
@click="scroll('down')"
@mousedown="scrollStart('down')" @mouseup="scrollStop()"
@mouseleave="scrollStop()" @touchstart="scrollStart('down')"
@touchend="scrollStop()" @touchcancel="scrollStop()"
:class="{active: (creneaux.length>3 && this.scrollCounter<(creneaux.length/2)) }"><img src="/ldc/img/chevron_down.svg"></div>
</section>
</div>
</div>
<input type="hidden" :value="selectedCreneau" name="selectedcreneau">
</div>
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small m-3">
<span class="text-green">3.</span>
Choisissez l'heure du retrait de votre commande
</h3>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col" v-for="(creneau,index) in creneaux" :class="styleCren(creneau)" @click="selectSlot(creneau)" ref="cren" :key="index">
<div class="card m-0 mb-lg-3" :class="styleCren(creneau)">
<div class="row bkg-medium-grey rounded-4 g-0 p-3">
<div class="d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-small font-Barlow-medium">{{creneau.horaire}}</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -176,7 +161,7 @@ export default {
availableCreneaux: [],
scrollCounter: 0,
interval:false,
magasins: [],
magasin: {},
selectedmagasin: null,
}
},
@ -185,9 +170,9 @@ export default {
//this.availableCrenaux = this.dbavailablecreneaux;
this.selectedDay = this.current.toLocaleDateString();
this.currentmonth = this.month; //this.months.indexOf(this.month);
this.magasins = JSON.parse(this.dbmagasin);
this.magasin = JSON.parse(this.dbmagasin);
this.loadAvailableCreneaux();
this.choosemagasin(1);
this.choosemagasin(this.magasin.id);
},
methods: {
nextMonth() {
@ -229,7 +214,7 @@ export default {
styleCren(creneau) {
return {
'dispo' : creneau.dispo,
'selected' : creneau.selected
'card-activate' : creneau.selected
}
},
prepare() {

View file

@ -12,16 +12,4 @@ function filtersMenu() {
filterMenu.classList.toggle("filters-hidden");
}
/* ----- BASKET ----- */
var basket = document.getElementById("basket");
var basketBtn = document.querySelector("#navbar .btn-navbar");
var basketCross = document.querySelector("#basket .icon-cross");
if (basketBtn)
basketBtn.addEventListener("click", showBasket);
if (basketCross)
basketCross.addEventListener("click", showBasket);
function showBasket() {
basket.classList.toggle("basket-hidden");
}

View file

@ -0,0 +1,23 @@
window.showModalClearCart = function() {
$('#empty-basket-modal > div.modal').show();
}
window.closeModalClearCart = function() {
$('#empty-basket-modal > div.modal').hide();
}
/* ----- BASKET ----- */
document.addEventListener("DOMContentLoaded", function() {
var basket = document.getElementById("basket");
var basketBtn = document.querySelector("#navbar .btn-navbar");
var basketCross = document.querySelector("#basket .icon-cross");
if (basketBtn)
basketBtn.addEventListener("click", showBasket);
if (basketCross)
basketCross.addEventListener("click", showBasket);
function showBasket() {
basket.classList.toggle("basket-hidden");
}
});

View file

@ -1,3 +1,4 @@
import 'bootstrap';
window._ = require('lodash');
window.$ = window.jQuery = require('jquery');

View file

@ -1,154 +1,2 @@
<div id="basket" class="basket-hidden w-100 h-100 position-fixed top-50 start-50 translate-middle">
<div class="basket-preview container-fluid position-absolute top-0 rounded-4">
<div class="d-flex flex-row justify-content-between align-items-center border-bottom pb-2 mx-2 mx-md-4">
<p class="title-small font-Barlow-bold m-0">Aperçu du panier</p>
<button class="btn icon-medium icon-cross"></button>
</div>
<ul class="list-group rounded-0 px-2 px-md-4" data-simplebar>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_1.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_2.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_3.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_4.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_1.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_2.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_3.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-start p-3">
<img class="basket-icon" src="{{ asset(config('app.theme') . "/img/eng_4.png") }}" alt="">
<div class="d-flex flex-column justify-content-start align-items-start">
<p class="m-0 font-Barlow-bold">Filet de Poulet</p>
<p class="m-0 font-Barlow-bold">XXX</p>
<p class="m-0">barquette x2</p>
</div>
<div class="d-flex flex-column justify-content-start align-items-center">
<p class="m-0 font-Barlow-bold">3,99€</p>
<div class="btn d-flex justify-content-around align-items-center rounded-4 btn-basket p-0">
<span class="btn p-1">-</span>
<span>1</span>
<span class="btn p-1">+</span>
</div>
</div>
<button class="btn icon-small icon-cross"></button>
</li>
</ul>
<div class="title-small d-flex flex-row justify-content-between align-items-center font-Barlow-bold px-2 px-md-4">
<p>Total</p>
<p>16,48€</p>
</div>
<div class="d-flex flex-row justify-content-between align-items-center px-2 px-md-4">
<button class="btn text-uppercase rounded-4">Vider le panier</button>
<button class="btn btn-product text-uppercase font-Barlow-bold rounded-4">Commander</button>
</div>
</div>
</div>
<!-- Cart Panel -->
<basket-panel ref="basketpanel"></basket-panel>

View file

@ -1,17 +1,18 @@
@include('layouts.head')
@include('layouts.navbar')
<body>
@include('layouts.basket')
<div id="app">
@include('layouts.navbar')
@yield('content')
@include('layouts.basket')
@include('layouts.footer')
@yield('content')
<script src="{{ asset(config('app.theme') . '/js/app.js') }}"></script>
@yield('scripts')
@include('layouts.footer')
</div>
<script src="{{ asset(config('app.theme') . '/js/app.js') }}"></script>
@yield('scripts')
@include('partials.cookie')
@include('partials.cookie')
</body>
</html>

View file

@ -31,13 +31,12 @@
<div class="d-flex justify-content-center align-items-center">
<a class="btn btn-icon btn-search-icon d-lg-none p-0" href="#redirection-vers-page-ranges" role="button"></a>
<button class="btn btn-navbar d-flex justify-content-center align-items-center position-relative p-0 mx-3" role="button">
<span class="btn-basket-item d-none d-lg-block position-absolute top-0 start-0 rounded-circle text-white">12</span>
<span class="btn-basket-item d-none d-lg-block position-absolute top-0 start-0 rounded-circle text-white"><basket-counter></basket-counter></span>
<div class="btn-icon btn-basket-icon"></div>
<span class="d-none d-lg-block">0,00€</span>
<span class="d-none d-lg-block"><basket-amount></basket-amount></span>
</button>
<a class="btn btn-icon btn-profile-icon p-0" href="{{ route('account.dashboard') }}" role="button">
</a>
</div>
</div>
</nav>

View file

@ -1,18 +1,18 @@
<div class="order__actions">
<div class="recap-actions d-flex flex-row justify-content-between align-items-center w-100 my-5">
@if ( $activestep < 3 )
<a class="btn btn_tertiary order__prev-step" href="{{ route('ranges') }}">Continuer mes achats</a>
<a class="btn d-none d-lg-block" href="{{ route('ranges') }}">⟵ Continuer mes achats</a>
@else
<span><!-- --></span>
<!-- -->
@endif
@if ( $activestep == 2 )
@if ( $activestep == 1 )
<form action="{{ route('sales.order-init') }}" method="POST">
@csrf
<input type="submit" class="btn order__next-step" value="Suivant >">
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Suivant >">
</form>
@elseif ( $activestep == 3 )
@elseif ( $activestep == 2 )
<form action="{{ route('sales.order-save-slot') }}" method="POST">
@csrf
<input type="submit" class="btn order__next-step" value="Suivant >">
<input type="submit" class="class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4"" value="Suivant >">
</form>
@endif
</div>

View file

@ -3,24 +3,24 @@
<div class="col-2 d-flex d-lg-none justify-content-start align-items-center p-0">
<button class="btn">⟵</button>
</div>
<div class="col-8 col-lg-12 p-0 p-lg-1 active">
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 1 ? "active" : ($activestep > 1 ? "step-done" : "") }}">
<div class="row">
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">1-</span>
<p class="col p-0 m-0">Récapitulatif</p>
</div>
</div>
<div class="col-8 col-lg-12 p-0 p-lg-1">
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 2 ? "active" : ($activestep > 2 ? "step-done" : "") }}">
<div class="row">
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">2-</span>
<p class="col p-0 m-0">Réservation</p>
</div>
</div>
<div class="col-8 col-lg-12 p-0 p-lg-1">
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 3 ? "active" : ($activestep > 3 ? "step-done" : "") }}">
<div class="row">
<span class="col-2 col-xl-1 d-none d-lg-block overflow-hidden font-Barlow-bold p-0">3-</span>
<p class="col p-0 m-0">Confirmation</p>
</div>
</div>
<span class="col-2 d-flex d-lg-none justify-content-end align-items-center">1/3</span>
<span class="col-2 d-flex d-lg-none justify-content-end align-items-center">{{ $activestep }}/3</span>
</div>
</article>

View file

@ -9,119 +9,150 @@
<article class="row row-cols-1 row-cols-md-3 m-0 card-promotion">
<!-- PRODUCT'S IMAGE -->
<div class="p-2">
<img class="w-100" src="./resources/assets/img/eng_2.png" alt="">
@if (isset($product->picture_large))
<img class="w-100" src="{{ asset('/images/produits/' . $product->picture_large) }}">
@elseif(isset($product->picture))
<img class="w-100" src="{{ asset('/images/produits/' . $product->picture) }}" />
@else
<img class="w-100" src="{{ asset(config('app.theme') . '/img/pl_nophoto.png') }}">
@endif
</div>
<!-- PRODUCT'S DESCRIPTION -->
<div class="d-flex flex-column-reverse justify-content-between align-items-center flex-md-column justify-content-md-start p-2">
<div>
<h1 class="position-fixed position-lg-relative product-title text-center text-lg-start text-dark">Filet de poulet X2</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint esse molestias omnis et, doloremque laborum!</p>
<p class="font-Barlow-medium">Conseil de préparation :</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio tenetur nisi suscipit ?</p>
<h1 class="position-fixed position-lg-relative product-title text-center text-lg-start text-dark">{{ $product->name }}</h1>
<p>{!! $product->description !!}</p>
@if (!empty($product->foodProduct->preparation))
<p class="font-Barlow-medium">Conseil de préparation :</p>
<p>{!! $product->foodProduct->preparation ?? '' !!}</p>
@endif
<div class="mb-4">
<p class="font-Barlow-medium m-0">Poids moyen du produit : XX</p>
<p class="font-Barlow-medium m-0">Produit poids variable : XX</p>
<p class="font-Barlow-medium m-0">Poids moyen du produit : {{ $product->weight }} {{ $product->weight_unit }}</p>
<p class="font-Barlow-medium m-0">Produit poids variable : ??</p>
</div>
</div>
<div class="w-100 d-flex flex-row justify-content-between justify-content-md-start align-items-center">
<img class="card-action-nutriscore m-3" src="./resources/assets/img/nutriscore/nutriscore-1.png">
<img class="card-action-nutriscore m-3" src="./resources/assets/img/nutriscore/nutriscore-1.png">
<img class="card-action-nutriscore m-3" src="./resources/assets/img/nutriscore/nutriscore-1.png">
<img class="card-action-nutriscore m-3" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-1.png") }}">
<img class="card-action-nutriscore m-3" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-1.png") }}">
<img class="card-action-nutriscore m-3" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-1.png") }}">
</div>
<div class="card-action position-fixed position-lg-relative d-flex justify-content-between align-items-center w-100 px-4 px-md-0">
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold">
<span class="card-price-original position-relative">5,99€</span>
<span class="card-price-new h3">3,99€</span>
</div>
<div class="btn btn-product btn-basket d-flex justify-content-around align-items-center rounded-4 p-0">
<span class="btn text-white p-1">-</span>
<span>1</span>
<span class="btn text-white p-1">+</span>
@if ($product->promotions->count())
<span class="card-price-original position-relative">@fmt_currency($product->priceTtc) @fmt_sellunit($product->sell_unit)</span>
@endif
<span class="card-price-new h3">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
</div>
@can('addToCart', $product)
<basket-buttons :product-id='{{$product->id}}'></basket-buttons>
@endcan
</div>
</div>
<!-- PRODUCT'S DETAILS -->
<div id="list" class="p-2">
<div class="bkg-white rounded-4">
<button class="btn btn-product title-small rounded-4 text-dark w-100 font-Barlow-medium position-relative d-flex flex-row justify-content-between align-items-center"
type="button" data-bs-toggle="collapse" data-bs-target="#ingredientsList" aria-expanded="false"
aria-controls="ingredientsList">
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-medium me-2" src="./resources/assets/img/icons/icon_check.png" alt="">
Liste d'ingrédients
@if (!empty($product->foodProduct->ingredients))
<div class="bkg-white rounded-4">
<button class="btn btn-product title-small rounded-4 text-dark w-100 font-Barlow-medium position-relative d-flex flex-row justify-content-between align-items-center"
type="button" data-bs-toggle="collapse" data-bs-target="#ingredientsList" aria-expanded="false"
aria-controls="ingredientsList">
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-medium me-2" src="{{ asset(config('app.theme') . "/img/icons/icon_check.png") }}" alt="">
Liste d'ingrédients
</div>
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-arrow" src="{{ asset(config('app.theme') . "/img/icons/icon_arrow.png") }}" alt="">
</div>
</button>
<div id="ingredientsList" class="collapse">
<p class="m-0 p-3">{!! $product->foodProduct->ingredients ?? '' !!}</p>
@if (!empty($product->foodProduct->allergens))
<p class="m-0 p-3">{!! $product->foodProduct->allergens !!}</p>
@endif
</div>
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-arrow" src="./resources/assets/img/icons/icon_arrow.png" alt="">
</div>
</button>
<div id="ingredientsList" class="collapse">
<p class="m-0 p-3">Du saucisson, de la matière grasse hmmm.</p>
</div>
</div>
<div class="bkg-white rounded-4 mt-3">
<button class="btn btn-product title-small rounded-4 text-dark w-100 font-Barlow-medium position-relative d-flex flex-row justify-content-between align-items-center"
type="button" data-bs-toggle="collapse" data-bs-target="#nutritionalValues" aria-expanded="false"
aria-controls="nutritionalValues">
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-medium me-2" src="./resources/assets/img/icons/icon_search.png" alt="">
Valeurs nutritionnelles
</div>
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-arrow" src="./resources/assets/img/icons/icon_arrow.png" alt="">
</div>
</button>
<div id="nutritionalValues" class="collapse">
<div class="p-3">
<table class="table table-striped p-3">
<thead>
<tr>
<th>
<!-- Laisser vide -->
</th>
<th class="text-center">Pour 2g</th>
</tr>
</thead>
<tbody>
<tr>
<th>Énergie</th>
<th class="text-center">2g<br>2g</th>
</tr>
<tr>
<th><span>Matières Grasses<br><span class="fw-light">dont Acides Gras Saturés</span></th>
<th class="text-center">2g<br><span class="fw-light">2g</span></th>
</tr>
<tr>
<th>Glucides<br><span class="fw-light">dont sucres</span></th>
<th class="text-center">2g<br><span class="fw-light">2g</span></th>
</tr>
<tr>
<th>Fibres alimentaires</th>
<th class="text-center">2g</th>
</tr>
<tr>
<th>Protéines</th>
<th class="text-center">2g</th>
</tr>
<tr>
<th>Sel</th>
<th class="text-center">1g</th>
</tr>
</tbody>
</table>
<p class="fst-italic text-muted m-0">*Apports Quotidien de référence pour un adulte (8400kj/2000kcal).</p>
@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="bkg-white rounded-4 mt-3">
<button class="btn btn-product title-small rounded-4 text-dark w-100 font-Barlow-medium position-relative d-flex flex-row justify-content-between align-items-center"
type="button" data-bs-toggle="collapse" data-bs-target="#nutritionalValues" aria-expanded="false"
aria-controls="nutritionalValues">
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-medium me-2" src="{{ asset(config('app.theme') . "/img/icons/icon_search.png") }}" alt="">
Valeurs nutritionnelles
</div>
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-arrow" src="{{ asset(config('app.theme') . "/img/icons/icon_arrow.png") }}" alt="">
</div>
</button>
<div id="nutritionalValues" class="collapse">
<div class="p-3">
<table class="table table-striped p-3">
<thead>
<tr>
<th>
<!-- Laisser vide -->
</th>
<th class="text-center">Pour {{ $product->foodProduct->nv_ref_weight_g }}g</th>
</tr>
</thead>
<tbody>
<tr>
<th>Énergie</th>
<th class="text-center">
{{ $product->foodProduct->nv_kj }} Kj<br>
{{ $product->foodProduct->nv_kcal }} Kcal</th>
</tr>
<tr>
<th><span>Matières Grasses<br><span class="fw-light">dont Acides Gras Saturés</span></th>
<th class="text-center">{{ $product->foodProduct->nv_fat_g }} g<br><span class="fw-light">{{ $product->foodProduct->nv_sat_fat_g }} g</span></th>
</tr>
<tr>
<th>Glucides<br><span class="fw-light">dont sucres</span></th>
<th class="text-center">{{ $product->foodProduct->nv_carb_g }} g<br><span class="fw-light">{{ $product->foodProduct->nv_sugar_g }} g</span></th>
</tr>
<tr>
<th>Fibres alimentaires</th>
<th class="text-center">{{ $product->foodProduct->nv_fiber_g }} g</th>
</tr>
<tr>
<th>Protéines</th>
<th class="text-center">{{ $product->foodProduct->nv_protein_g }} g</th>
</tr>
<tr>
<th>Sel</th>
<th class="text-center">{{ $product->foodProduct->nv_salt_g }} g</th>
</tr>
</tbody>
</table>
<p class="fst-italic text-muted m-0">*Apports Quotidien de référence pour un adulte (8400kj/2000kcal).</p>
</div>
</div>
</div>
@endif
{{-- aucune fonctionnalité de recettes associées
<div class="bkg-white rounded-4 mt-3">
<button class="btn btn-product title-small rounded-4 text-dark w-100 font-Barlow-medium position-relative d-flex flex-row justify-content-between align-items-center"
type="button" data-bs-toggle="collapse" data-bs-target="#recipeSuggestion" aria-expanded="false"
aria-controls="recipeSuggestion">
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-medium me-2" src="./resources/assets/img/icons/icon_tocque.png" alt="">
<img class="icon-medium me-2" src="{{ asset(config('app.theme') . "/img/icons/icon_tocque.png") }}" alt="">
Suggestion de recette
</div>
<div class="d-flex flex-row justify-content-center align-items-center">
<img class="icon-arrow" src="./resources/assets/img/icons/icon_arrow.png" alt="">
<img class="icon-arrow" src="{{ asset(config('app.theme') . "/img/icons/icon_arrow.png") }}" alt="">
</div>
</button>
<div id="recipeSuggestion" class="collapse font-Barlow-medium">
@ -131,6 +162,13 @@
</details>
</div>
</div>
--}}
{{--
en revanche il existe une fonctionnalité de produits associés
@if ($product->products->count())
@include('partials.products-related')
@endif
--}}
</div>
</article>
</main>

View file

@ -14,36 +14,34 @@
<p class="d-none d-lg-block title-regular text-center text-uppercase font-Barlow-extra-bold m-3">Confirmation</p>
<h2 class="title-small font-Barlow-extra-bold mb-3">Votre commande est enregistrée !</h2>
<p class="m-0">Merci pour cette commande !</p>
<p>Une confirmation vient de vous être envoyée sur l'adresse mail xxxx.xxxx@xxxx.xx.</p>
<p>Une confirmation vient de vous être envoyée sur l'adresse mail {{ $order->customer->email }}</p>
<table class="table table-borderless d-none d-lg-table">
<thead>
<tr class="border-bottom border-dark border-2">
<td class="font-Barlow-bold">Rrappel de votre commande ref: xxxxxxxxxx :</td>
<td class="font-Barlow-bold">Rappel de votre commande ref: {{ $order->reference }} :</td>
<td></td>
</tr>
</thead>
<tbody>
<tr>
<td>1 x Poulet blanc fermier Le Gaulois x2 - 300g :</td>
<td class="text-end">15,25€</td>
</tr>
<tr>
<td>1 x Cuisse de poulet Le Gaulois x2 - 300g :</td>
<td class="text-end">15,25€</td>
</tr>
@foreach ($order->lines as $line)
<tr>
<td>{{ $line->quantity }} x {{ $line->product->name }} :</td>
<td class="text-end">{{ $line->formattedTotalTtc }}</td>
</tr>
@endforeach
<tr class="border-bottom border-dark border-2">
<td></td>
<td class="text-end font-Barlow-bold">Total estimé : 30,50€</td>
<td class="text-end font-Barlow-bold">Total estimé : {{ $order->formattedTotalTtc }}</td>
</tr>
</tbody>
</table>
<p>À retirer le <span class="font-Barlow-medium">11/06/2022</span> à 09:15, à l'adresse suivante :</p>
<p class="font-Barlow-medium m-0">LDC Sablé</p>
<p class="font-Barlow-medium m-0">Siège Social de Sablé</p>
<p class="font-Barlow-medium m-0">72800 Sable sur Sarthe</p>
<p>À retirer le <span class="font-Barlow-medium">{{ $order->timeslot->day }}</span> à {{ $order->timeslot->time }}, à l'adresse suivante :</p>
<p class="font-Barlow-medium m-0">{{ $magasin->name }}</p>
<p class="font-Barlow-medium m-0">{{ $magasin->address }}</p>
<p class="font-Barlow-medium m-0">{{ $magasin->postcode }} {{ $magasin->city }}</p>
<div class="recap-actions d-flex d-lg-none flex-row justify-content-between align-items-center w-100 my-5">
<a class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" href="#" role="button">Retour à la boutique</a>
<a class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" href="{{ route('home') }}" role="button">Retour à la boutique</a>
</div>
</article>
</div>

View file

@ -10,109 +10,31 @@
<p class="breadcrumb d-none d-lg-block text-muted p-2 m-0">Accueil / Panier / Réservation</p>
<div class="row m-0">
@include('partials.tunnel-stepper')
<form action="" method="" class="col mt-6 m-lg-0">
<p class="d-none d-lg-block title-regular text-center text-uppercase font-Barlow-extra-bold m-3">Choisissez où et quand retirer votre commande</p>
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small">
<span class="text-green">1.</span>
Votre point de retrait
</h3>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col m-0">
<div class="card mb-3">
<div class="row bkg-medium-grey shadow rounded-4 g-0 p-3">
<div class="col-4">
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
</div>
<div class="col-8 d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-regular text-uppercase font-Barlow-extra-bold">LDC Cavol</h5>
<p class="card-text font-Barlow-medium m-0">Les épinettes</p>
<p class="card-text font-Barlow-medium m-0">72540 Loué</p>
<p class="card-text font-Barlow-medium m-0">02.43.88.26.88</p>
</div>
</div>
<form action="{{ route('sales.order-save-slot') }}" method="POST" class="col mt-6 m-lg-0">
@csrf
@if ($errors->any())
<div class="form__error">
@foreach ($errors->all() as $error)
<div>{{ $error }}</div>
@endforeach
</div>
@elseif (session('success'))
<div class="form__success">
{{ session('success') }}
</div>
</div>
<div class="col m-0">
<div class="card card-activate mb-3">
<div class="row bkg-medium-grey shadow rounded-4 g-0 p-3">
<div class="col-4">
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
</div>
<div class="col-8 d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-regular text-uppercase font-Barlow-extra-bold">LDC Sablé</h5>
<p class="card-text font-Barlow-medium m-0">Siège Social de Sablé</p>
<p class="card-text font-Barlow-medium m-0">72800 Sable sur Sarthe</p>
</div>
</div>
</div>
</div>
</div>
<div class="col m-0">
<div class="card mb-3">
<div class="row bkg-medium-grey shadow rounded-4 g-0 p-3">
<div class="col-4">
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
</div>
<div class="col-8 d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-regular text-uppercase font-Barlow-extra-bold">LDC Cavol</h5>
<p class="card-text font-Barlow-medium m-0">Les épinettes</p>
<p class="card-text font-Barlow-medium m-0">72540 Loué</p>
<p class="card-text font-Barlow-medium m-0">02.43.88.26.88</p>
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small m-3">
<span class="text-green">2.</span>
Choisissez le jour du retrait de votre commande
</h3>
<input placeholder="Select date" type="date" id="example" class="form-control w-fit m-2 mx-0">
<h3 class="font-Barlow-extra-bold text-center text-lg-start text-uppercase title-small m-3">
<span class="text-green">3.</span>
Choisissez l'heure du retrait de votre commande
</h3>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col">
<div class="card m-0 mb-lg-3">
<div class="row bkg-medium-grey rounded-4 g-0 p-3">
<div class="d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-small font-Barlow-medium">11h00 - 11h30</h5>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card card-activate m-0 mb-lg-3">
<div class="row bkg-medium-grey rounded-4 g-0 p-3">
<div class="d-flex flex-column justify-content-center align-items-center">
<div class="card-body">
<h5 class="card-title title-small font-Barlow-medium">12h15 - 14h00</h5>
</div>
</div>
</div>
</div>
</div>
</div>
@endif
<input type="hidden" name="order_ref" value="{{ $order->reference }}">
<timeslot-picker :show-only-availables='false' dbavailablecreneaux='@json($availCreneaux)'
dbmagasin='@json($magasin)'></timeslot-picker>
<div class="form-check d-flex flex-row-reverse justify-content-end align-items-start p-0 my-3">
<label class="form-check-label" role="button" for="cgv">
J'ai lu et j'accepte les conditions générales de vente.
<label class="form-check-label" role="button" for="ok_cgv">
J'ai lu et j'accepte les <a href="{{ route('terms') }}" target="_cgv">conditions générales de vente</a>.
</label>
<input class="form-check-input m-2 m-lg-1" type="checkbox" role="button" id="cgv">
<input class="form-check-input m-2 m-lg-1 @error('ok_cgv') form__error @enderror" type="checkbox" role="button" id="ok_cgv" name="ok_cgv">
</div>
<div class="recap-actions d-flex flex-row-reverse justify-content-between align-items-center w-100 my-5">
<button class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4">Suivant ></button>
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Suivant >">
</div>
</form>
</div>

View file

@ -21,23 +21,40 @@
</tr>
</thead>
<tbody class="border-bottom border-dark">
@foreach ($cart as $cartItem)
<tr class="position-relative">
<!-- CARD -->
<td class="card position-relative border-0 p-2 px-lg-0 py-lg-3">
<div class="d-flex flex-row justify-content-center justify-content-lg-start align-items-center p-0 w-100 m-0">
<div class="position-relative w-25">
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none text-center m-0">bientôt disponible</p>
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
<a href="{{ route('product', ['productSlug' => $cartItem->model->slug]) }}"
title="{{ $cartItem->name }}" target="_self" class="product-card-image">
@if (isset($cartItem->model->picture))
<img src="{{ asset('/images/produits/' . $cartItem->model->picture) }}"
alt="{{ $cartItem->name }}" class="img-fluid">
@else
<img src="{{ asset(config('app.theme') . '/img/pl_nophoto.png') }}"
alt="{{ $cartItem->name }}" class="img-fluid">
@endif
</a>
</div>
<div class="card-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 w-lg-auto h-100 ps-2">
<div>
<h5 class="font-Barlow-bold m-0">Saucisseries</h5>
<p class="my-2">En boucherie ou pas ?</p>
<a href="{{ route('product', ['productSlug' => $cartItem->model->slug]) }}"
title="{{ $cartItem->name }}" target="_self">
<h5 class="font-Barlow-bold m-0">
{{ $cartItem->name }}
</h5>
</a>
<p class="my-2">{!! $cartItem->model->description !!}</p>
</div>
<div class="card-action d-flex justify-content-between align-items-center w-100">
<div class="card-price d-flex flex-row-reverse justify-content-center align-items-center font-Barlow-bold">
<span class="card-price-original position-relative">5,99€</span>
<span class="card-price-new h3 me-3">3,99€</span>
@if ($cartItem->model->promotions->count())
<span class="card-price-original position-relative">@fmt_currency($cartItem->model->priceTtc)</span>
@endif
<span class="card-price-new h3 me-3">@fmt_currency($cartItem->model->discountedPriceTtc)</span>
</div>
<a href="#" class="btn btn-product d-block d-lg-none text-white rounded-4 btn-basket icon-cart-white"></a>
</div>
@ -46,77 +63,14 @@
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 rounded-4"></div>
</td>
<!-- END CARD -->
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">1</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="p-0">
<button class="btn btn-cross position-absolute icon-medium icon-cross"></button>
</td>
</tr>
<tr class="position-relative">
<!-- CARD -->
<td class="card position-relative border-0 p-2 px-lg-0 py-lg-3">
<div class="d-flex flex-row justify-content-center justify-content-lg-start align-items-center p-0 w-100 m-0">
<div class="position-relative w-25">
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none text-center m-0">bientôt disponible</p>
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
</div>
<div class="card-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 w-lg-auto h-100 ps-2">
<div>
<h5 class="font-Barlow-bold m-0">Saucisseries</h5>
<p class="my-2">En boucherie ou pas ?</p>
</div>
<div class="card-action d-flex justify-content-between align-items-center w-100">
<div class="card-price d-flex flex-row-reverse justify-content-center align-items-center font-Barlow-bold">
<span class="card-price-original position-relative">5,99€</span>
<span class="card-price-new h3 me-3">3,99€</span>
</div>
<a href="#" class="btn btn-product d-block d-lg-none text-white rounded-4 btn-basket icon-cart-white"></a>
</div>
</div>
</div>
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 rounded-4"></div>
</td>
<!-- END CARD -->
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">1</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="p-0">
<button class="btn btn-cross position-absolute icon-medium icon-cross"></button>
</td>
</tr>
<tr class="position-relative">
<!-- CARD -->
<td class="card position-relative border-0 p-2 px-lg-0 py-lg-3">
<div class="d-flex flex-row justify-content-center justify-content-lg-start align-items-center p-0 w-100 m-0">
<div class="position-relative w-25">
<p class="position-absolute top-50 start-50 translate-middle font-Barlow-bold title-small text-uppercase d-none text-center m-0">bientôt disponible</p>
<img src="./resources/assets/img/eng_1.png" class="img-fluid" alt="...">
</div>
<div class="card-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 w-lg-auto h-100 ps-2">
<div>
<h5 class="font-Barlow-bold m-0">Saucisseries</h5>
<p class="my-2">En boucherie ou pas ?</p>
</div>
<div class="card-action d-flex justify-content-between align-items-center w-100">
<div class="card-price d-flex flex-row-reverse justify-content-center align-items-center font-Barlow-bold">
<span class="card-price-original position-relative">5,99€</span>
<span class="card-price-new h3 me-3">3,99€</span>
</div>
<a href="#" class="btn btn-product d-block d-lg-none text-white rounded-4 btn-basket icon-cart-white"></a>
</div>
</div>
</div>
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 rounded-4"></div>
</td>
<!-- END CARD -->
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">1</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">3.99€</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">{{ $cartItem->qty }}</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">@fmt_currency($cartItem->model->discountedPriceTtc)</td>
<td class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">{{ sprintf('%s €', number_format($cartItem->model->discountedPriceTtc * $cartItem->qty, 2, ',', ' ')) }}</td>
<td class="p-0">
<button class="btn btn-cross position-absolute icon-medium icon-cross"></button>
</td>
</tr>
@endforeach
</tbody>
</table>
<table class="table-total table m-0 rounded-4">
@ -124,15 +78,11 @@
<td class="d-none d-lg-table-cell border-0"></td>
<td class="d-none d-lg-table-cell border-0"></td>
<td class="border-0 text-center align-middle p-0 p-lg-2">Total estimé TTC</td>
<td class="title-small border-0 text-center align-middle p-0 p-lg-2 font-Barlow-extra-bold">16.48€</td>
<td class="title-small border-0 text-center align-middle p-0 p-lg-2 font-Barlow-extra-bold">{{ sprintf('%s €', number_format($cartInfos['totalTTC'], 2, ',', ' ')) }}</td>
</tr>
</table>
</div>
<div class="recap-actions d-flex flex-row justify-content-between align-items-center w-100 my-5">
<button class="btn d-none d-lg-block">⟵ Continuer mes achats</button>
<button class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4">Suivant ></button>
</div>
@include('partials.tunnel-actions')
</article>
</div>
</main>

View file

@ -19,6 +19,7 @@
@import './fo/partials/navbar';
@import './fo/partials/footer';
@import './fo/partials/basket';
@import './fo/partials/calendar';
// PAGES
@import './fo/pages/home';

View file

@ -87,6 +87,7 @@
.btn-basket {
width: 4rem;
height: 2.5rem;
z-index: 50;
}
// Icons.

View file

@ -0,0 +1,172 @@
//couleurs
$main-bg: $white;
$calendar-bg: $light-grey;
$light-text: $white;
$dark-section-bg: $light-grey;
//timeslot picker
.timeslot-container {
margin: 1em 0;
}
.timeslot-container + .cgv {
flex-direction: row-reverse;
}
.calendar {
background-color: $main-bg;
h2 {
text-align: center;
font-weight: 500;
background-color: $main-bg;
line-height: 40px;
span {
color: #fff;
background-color: $primary;
vertical-align: middle;
text-align: center;
border-radius: 15px;
line-height: 0;
width:30px;
display: inline-block;
margin: 0 1em;
cursor: pointer;
&:hover {
background-color: $secondary;
}
}
}
.content {
.current>span {
border-radius: 20px;
width: 40px;
margin: auto;
display: inline-block;
background-color: #ccc;
}
.grey {
background-color: #ebebeb;
}
.selected>span {
border-radius: 20px;
width: 40px;
margin: auto;
color: $light-text;
background-color: $secondary;
display: inline-block;
}
.last, .next {
color: #999;
}
.unavailable{
color: #999;
color: rgba(153,153,153,0.6);
cursor: initial;
}
}
}
.calendar .content,
.calendar header {
background-color: $calendar-bg;
}
.calendar .content,
.calendar header {
display: flex;
flex-wrap: wrap;
}
.calendar .content>div,
.calendar header>div,
.creneaux__list div {
box-sizing: border-box;
line-height: 40px;
height: 40px;
width: 14.28571427%;
text-align: center;
}
.calendar .content>div,
.calendar header>div,
.creneaux__list div.dispo {
cursor: pointer;
}
.creneaux {
background-color: $dark-section-bg;
header {
font-weight: 500;
text-align: center;
line-height: 40px;
background-color: $light-grey;
}
}
.creneaux__list {
background-color: $white;
height: 240px;
position: relative;
.creneaux__slots {
scroll-behavior: smooth;
height: 240px;
overflow-y: hidden;
position: inherit;
top: initial;
&.hasDown {
height: 200px;
top: initial;
}
&.hasUp.hasDown {
height: 160px;
top: 40px;
}
&.hasUp {
height: 200px;
top: 40px;
}
}
div {
color: #999;
background-color: $dark-section-bg;
width:90%;
margin: 0.5em auto;
border-radius: 24px;
&.scroll-up, &.scroll-down{
display:none;
color: #fff;
background-color: $grey;
border-radius: 15px;
width:30px;
height: 30px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
margin: 5px auto;
&:hover {
background-color: $secondary;
}
&.active {
display:block;
}
}
&.scroll-up{
top: 0;
}
&.dispo {
color : initial;
&:hover {
color: #fff;
background-color: $primary;
}
}
&.selected {
color: #fff;
background-color: $secondary;
}
}
}