Merge branch 'boutique-sable' into develop
This commit is contained in:
commit
aec8287d80
28 changed files with 207 additions and 114 deletions
|
|
@ -30,7 +30,7 @@ class ProductBrand extends BaseEnumRoutable
|
|||
'loue' => 'Loué',
|
||||
'legaulois' => 'Le Gaulois',
|
||||
'marie' => 'Marie',
|
||||
'tregalette' => 'Tregalette',
|
||||
'tregalette' => 'Regalette',
|
||||
'esprirestauration' => 'Espri Restauration',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,11 @@ class ProductResource extends JsonResource
|
|||
'slug' => '',
|
||||
'name' => '',
|
||||
'description' => '',
|
||||
'price' => 0,
|
||||
'discountedPriceHt' => 0,
|
||||
'picture' => '',
|
||||
'orderable_start' => '',
|
||||
'orderable_end' => '',
|
||||
'weight_variable' => ''
|
||||
'weight_variable' => false,
|
||||
'sell_unit' => ''
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +48,8 @@ class ProductResource extends JsonResource
|
|||
$this->product->toArray(),
|
||||
self::$skeleton
|
||||
),
|
||||
['discountedPriceHt' => $this->product->discountedPriceHt],
|
||||
['priceTtc' => $this->product->priceTtc],
|
||||
['discountedPriceTtc' => $this->product->discountedPriceTtc],
|
||||
['promotion' => (isset($this->product->promotions[0])) ? $this->product->promotions : null],
|
||||
[
|
||||
'nutriscore' => (isset($this->product->foodProduct->nutriscore)) ?
|
||||
|
|
|
|||
|
|
@ -79,6 +79,15 @@ class AppServiceProvider extends ServiceProvider
|
|||
} ?>";
|
||||
});
|
||||
|
||||
Blade::directive('fmt_currency_without_ttc', function ($expression) {
|
||||
return "<?php
|
||||
if(is_float($expression)) {
|
||||
echo sprintf('%s €', number_format($expression, 2, ',', ' '));
|
||||
} else {
|
||||
echo $expression;
|
||||
} ?>";
|
||||
});
|
||||
|
||||
Blade::directive('fmt_sellunit', function ($expression) {
|
||||
if (config('bosettings.sell_unit_management') == "strict") {
|
||||
return "<?php if(!empty($expression)) { echo sprintf('/ %s', SellUnit::make($expression)->label); } ?>";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Activation de votre compte</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Activation de votre compte</h1>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p class="m-0 me-2">{{ $message }}</p>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Connexion</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Connexion</h1>
|
||||
<form action="{{ route('auth.login.post') }}" method="POST" class="col mx-auto">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Connexion</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Connexion</h1>
|
||||
<form action="{{ route('auth.connexion.post') }}" method="POST" class="col mx-auto">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white">Mot de passe oublié</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey">Mot de passe oublié</h1>
|
||||
<form action="{{ route('auth.reinit-mdp') }}" method="POST" class="col mx-auto text-center">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Changement de votre mot de passe</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Changement de votre mot de passe</h1>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p class="m-0 me-2">Votre mot de passe a bien été modifié.</p>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Connexion</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Connexion</h1>
|
||||
<form action="{{ route('auth.change-password', $token) }}" method="POST" class="col mx-auto">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Création de votre compte</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Création de votre compte</h1>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p class="m-0 me-2">Félicitations</p>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Inscription</h1>
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Inscription</h1>
|
||||
@if (session('success'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
@if (config('bosettings.register_salaries') && config('bosettings.register_public'))
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn no-after" onclick="visibility2()" type="button" id="codebutton">J'ai un code d'inscription</button>
|
||||
<button class="btn btn-product rounded-4 mb-2 no-after" onclick="visibility2()" type="button" id="codebutton">J'ai un code d'inscription</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2" id="codeinscription" style="display: none;">
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center">
|
||||
<p class="m-0 me-2">Déjà inscrit ?</p>
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.login') }}">Connectez-vous</a>
|
||||
<a class="btn btn-product rounded-4" href="{{ route('auth.connexion') }}">Connectez-vous</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
$('[name=code]').attr("required", true);
|
||||
$('#codebutton').text('Je n\'ai pas de code');
|
||||
}
|
||||
$('#codeinscription').show();
|
||||
$('#codeinscription').toggle();
|
||||
}
|
||||
function visibility3() {
|
||||
var x = document.getElementById('password');
|
||||
|
|
|
|||
|
|
@ -1,22 +1,25 @@
|
|||
@unless ($breadcrumbs->isEmpty())
|
||||
<div class="breadrumbs content">
|
||||
<div class="breadrumbs__wrapper wrapper">
|
||||
<div class="left__offset"></div>
|
||||
<div class="breadrumbs__inner">
|
||||
@foreach ($breadcrumbs as $breadcrumb)
|
||||
|
||||
@if (!is_null($breadcrumb->url) && !$loop->last)
|
||||
<a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a>
|
||||
@else
|
||||
<span>{{ $breadcrumb->title }}</span>
|
||||
@endif
|
||||
|
||||
@if(count($breadcrumbs) > 1 and !$loop->last)
|
||||
<span class="breadrumbs__arrow">></span>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
<div class="container pt-2">
|
||||
<div class="row ps-5">
|
||||
<div class="col ps-5">
|
||||
<div class="breadrumbs content ps-5">
|
||||
<div class="breadrumbs__wrapper wrapper">
|
||||
<div class="left__offset"></div>
|
||||
<div class="breadrumbs__inner text-grey">
|
||||
@foreach ($breadcrumbs as $breadcrumb)
|
||||
@if (!is_null($breadcrumb->url) && !$loop->last)
|
||||
<a href="{{ $breadcrumb->url }}" class="text-grey text-decoration-none">{{ $breadcrumb->title }}</a>
|
||||
@else
|
||||
<span>{{ $breadcrumb->title }}</span>
|
||||
@endif
|
||||
@if(count($breadcrumbs) > 1 and !$loop->last)
|
||||
<span class="breadrumbs__arrow">/</span>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endunless
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
@section('title', __('Accueil'))
|
||||
@section('description', 'Page d\'accueil de la boutique.')
|
||||
|
||||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<!-- SLIDER -->
|
||||
<article id="home-slider" class="row p-2 gx-0">
|
||||
|
|
@ -23,27 +25,26 @@
|
|||
<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">
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-white">Offres</h2>
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-grey">Offres</h2>
|
||||
<div class="swiper-container p-0 h-100">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($products as $product)
|
||||
<div class="swiper-slide d-flex justify-content-center align-items-center {{-- card-activate OU card-available-soon --}}">
|
||||
<div class="row rounded-4 m-2 p-3 m-0 position-relative card" role="button">
|
||||
<div class="col-md-4 p-0 w-100">
|
||||
<div class="position-relative w-75 w-md-100 mx-auto">
|
||||
<div class="row rounded-4 m-2 p-3 m-0 position-relative card h-100" role="button">
|
||||
<div class="col-md-4 p-0 w-100 h-100">
|
||||
<div class="position-relative w-75 w-md-100 h-lg-50 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="{{$product->name}}">
|
||||
<img src="{{ asset("/images/produits/" . $product->picture) }}" class="h-100 mw-100" alt="{{ $product->name }}">
|
||||
</div>
|
||||
<div class="card-body d-flex flex-column justify-content-center align-items-center px-3">
|
||||
<div class="card-body d-flex flex-column justify-content-center align-items-center h-lg-50 px-3">
|
||||
<h5 class="font-Barlow-bold m-2">
|
||||
<a class="text-decoration-none text-dark stretched-link" href="{{ route('product', $product->slug) }}">{{$product->name}}</a>
|
||||
<a class="text-decoration-none text-dark 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 mt-0 m-lg-4 mt-lg-0">
|
||||
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold m-2 mt-0 m-lg-0 my-lg-4">
|
||||
@if ($product->promotions->count())
|
||||
<span class="card-price-original position-relative me-2">@fmt_currency($product->priceTtc)</span>
|
||||
<span class="card-price-original position-relative me-2">@fmt_currency_without_ttc($product->priceTtc)</span>
|
||||
@endif
|
||||
<span class="card-price-new @if ($product->promotions->count()) text-red @endif h3">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
|
||||
<span class="card-price-new @if ($product->promotions->count()) text-red @endif h3">@fmt_currency_without_ttc($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
|
||||
</div>
|
||||
@if ($product->weight_variable)
|
||||
<p class="fst-italic text-muted">*Prix variable en fonction du poids</p>
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
|
||||
<!-- RANGES -->
|
||||
<article id="rayons" class="text-center">
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-white">Rayons</h2>
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-grey">Rayons</h2>
|
||||
<div class="row row-cols-2 row-cols-lg-3 d-flex justify-content-between justify-content-md-start gx-2 gx-lg-5 m-0">
|
||||
@foreach ($quickorder_ranges as $quickorder_range)
|
||||
<div class="col px-2">
|
||||
|
|
@ -94,7 +95,7 @@
|
|||
</article>
|
||||
|
||||
<article id="services" class="text-center">
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-white">Services</h2>
|
||||
<h2 class="title-big font-Barlow-extra-bold text-uppercase text-grey">Services</h2>
|
||||
<div id="demarche" class="row row-cols-3 row-cols-md-5 g-4">
|
||||
<div class="col">
|
||||
<div class="card h-100 d-flex flex-column justify-content-center align-items-center">
|
||||
|
|
|
|||
14
resources/views/front/sable/js/app.js
vendored
14
resources/views/front/sable/js/app.js
vendored
|
|
@ -62,6 +62,20 @@ const store = new Vuex.Store({
|
|||
}
|
||||
});
|
||||
|
||||
const metaCSRFToken = document.querySelector(
|
||||
"meta[name='csrf-token']"
|
||||
)
|
||||
|
||||
if (!metaCSRFToken) {
|
||||
throw new Error("Missing meta CSRF token");
|
||||
}
|
||||
|
||||
Axios.defaults.headers.common = {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"X-CSRF-TOKEN": metaCSRFToken.getAttribute("content"),
|
||||
};
|
||||
|
||||
window.axios = Axios;
|
||||
|
||||
const app = new Vue({
|
||||
|
|
|
|||
|
|
@ -32,10 +32,38 @@
|
|||
this.qttyInCart = this.fetchProductQttyInCart();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
axios.post('/ajax/get-cart', {
|
||||
instance: 'panier',
|
||||
}).then(response => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
},
|
||||
updateStore(result) {
|
||||
if (result[0].length != this.panier.length) {
|
||||
this.$store.commit({
|
||||
type: 'updatePanier',
|
||||
panier: result[0]
|
||||
});
|
||||
}
|
||||
this.$store.commit({
|
||||
type: 'updatePanier',
|
||||
panier: result[0]
|
||||
});
|
||||
this.$store.commit({
|
||||
type: 'updateCartTotals',
|
||||
cartTotals: result[1]
|
||||
});
|
||||
},
|
||||
addtocart(product,qtty) {
|
||||
console.log(this.$parent)
|
||||
this.$parent.addtocart(product,qtty);
|
||||
this.$root.addtocart(product,qtty);
|
||||
},
|
||||
fetchProductQttyInCart() {
|
||||
let foundQtty = 0;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<button class="btn text-uppercase rounded-4" v-show="!emptybasket" @click="confirmEmpty()">Vider le panier</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="position-absolute w-100 h-100 top-0 start-0" v-show="showConfirmEmpty">
|
||||
<div class="basket-empty position-absolute w-100 h-100 top-0 start-0" v-show="showConfirmEmpty">
|
||||
<div class="d-flex flex-column justify-content-center align-items-center w-100 h-100 bkg-white p-2 p-lg-5">
|
||||
<div class="title-regular font-Barlow-extra-bold text-uppercase text-center text-dark">
|
||||
Voulez-vous réellement vider votre panier ?
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- container de produit -->
|
||||
<section class="w-100 w-lg-75">
|
||||
<section class="w-100 w-lg-75 px-0 px-xl-2">
|
||||
<p class="title-small font-Barlow-bold m-3 text-center text-lg-start">Tous les rayons</p>
|
||||
<div v-if="loading" class="placeholder row m-0 g-4">
|
||||
<article class="col-lg-4 card position-relative rounded-4 p-3 m-0 my-2">
|
||||
|
|
@ -139,25 +139,24 @@
|
|||
<!-- card article -->
|
||||
<article v-for="(product, productIndex) in showedProducts"
|
||||
:key="productIndex"
|
||||
class="col-lg-4 card rounded-4 p-3 m-0"
|
||||
class="col-lg-4 card rounded-4 px-0 py-2 p-lg-1 p-xl-3 m-0"
|
||||
v-bind:class="[!product.availability ? 'card-available-soon' : '']">
|
||||
<div class="position-relative w-100 h-100 px-4 py-2">
|
||||
<div class="d-flex flex-row flex-lg-column justify-content-between align-items-center col-md-4 p-0 w-100 m-0">
|
||||
<div class="position-relative text-center w-50 w-lg-100">
|
||||
<div class="d-flex flex-row flex-lg-column justify-content-between align-items-center col-md-4 p-0 w-100 h-100 m-0">
|
||||
<div class="position-relative text-center w-50 w-lg-100 h-lg-50">
|
||||
<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 class="img-fluid" :src="'/images/produits/' + product.picture" :alt="'Image du produit '+product.name">
|
||||
<img class="h-100 mw-100" :src="'/images/produits/' + product.picture" :alt="'Image du produit '+product.name">
|
||||
</div>
|
||||
<div
|
||||
class="card-body d-flex flex-column justify-content-center align-items-start align-items-lg-center w-75 w-lg-100 px-2 px-lg-0">
|
||||
<div class="card-body d-flex flex-column justify-content-center justify-content-lg-between align-items-start align-items-lg-center w-75 w-lg-100 h-lg-50 ps-2 px-lg-0">
|
||||
<h5 class="font-Barlow-bold m-0 m-lg-2">
|
||||
<a class="text-decoration-none text-dark stretched-link" :href="'/produit/'+product.slug">{{ product.name }}</a>
|
||||
</h5>
|
||||
<p class="m-0" v-html="product.description"></p>
|
||||
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold mb-3 mt-0 m-lg-4 mt-lg-0">
|
||||
<span v-if="product.promotion != null" class="card-price-original position-relative me-2">{{ product.price }}€</span>
|
||||
<span class="card-price-new h3" v-bind:class="{'text-red': product.promotion}">{{ product.discountedPriceHt }}€</span>
|
||||
<div class="card-price d-flex flex-row flex-lg-row-reverse justify-content-center align-items-center font-Barlow-bold m-0 mb-3 m-lg-0 mb-lg-2">
|
||||
<span class="card-price-new h3" v-bind:class="{'text-red': product.promotion}">{{ currencyFormatter(product.discountedPriceTtc) }} / {{ product.sell_unit }}</span>
|
||||
<span v-if="product.promotion != null" class="card-price-original position-relative m-0 ms-2 m-lg-0 me-lg-2">{{ currencyFormatter(product.priceTtc) }}</span>
|
||||
</div>
|
||||
<p v-if="product.weight_variable" class="fst-italic text-muted">*Prix variable en fonction du poids</p>
|
||||
<div class="card-action d-flex flex-row-reverse justify-content-between align-items-center w-100">
|
||||
|
|
@ -362,6 +361,13 @@
|
|||
responsiveFiltersDisplay() {
|
||||
document.querySelector(".filters").classList.toggle("filters-hidden");
|
||||
document.querySelector("body").classList.toggle("overflow-hidden");
|
||||
},
|
||||
// General purpose.
|
||||
currencyFormatter(num) {
|
||||
if (isNaN(num)) {
|
||||
return num;
|
||||
}
|
||||
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
15
resources/views/front/sable/js/fo/cart.js
vendored
15
resources/views/front/sable/js/fo/cart.js
vendored
|
|
@ -9,9 +9,24 @@ window.closeModalClearCart = function() {
|
|||
/* ----- BASKET ----- */
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var basket = document.getElementById("basket");
|
||||
var basketEmpty = document.querySelector(".basket-empty")
|
||||
var basketPreview = document.querySelector(".basket-preview");
|
||||
var basketBtn = document.querySelector("#navbar .btn-navbar");
|
||||
var basketCross = document.querySelector("#basket .icon-cross");
|
||||
|
||||
if (basket)
|
||||
basket.addEventListener("click", (e) => {
|
||||
if (basketEmpty.style.display == "none") {
|
||||
if (e.pageX < basketPreview.offsetLeft) {
|
||||
showBasket();
|
||||
} else if(e.pageX > (basketPreview.offsetLeft + basketPreview.clientWidth)) {
|
||||
showBasket();
|
||||
} else if(e.pageY > (basketPreview.offsetTop + basketPreview.clientHeight)) {
|
||||
showBasket();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (basketBtn)
|
||||
basketBtn.addEventListener("click", showBasket);
|
||||
if (basketCross)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<link rel="canonical" href="{{ url()->current() }}" />
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset(config('app.theme') . '/css/app.css') }}" rel="stylesheet">
|
||||
|
|
@ -34,4 +34,6 @@
|
|||
@if(config('app.env') === 'local')
|
||||
<script>window.vueDebug = true;</script>
|
||||
@endif
|
||||
|
||||
@include('breadcrumb.breadcrumb-head')
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
@include('layouts.basket')
|
||||
|
||||
@include('breadcrumb.breadcrumb-body')
|
||||
@yield('content')
|
||||
|
||||
@include('layouts.footer')
|
||||
|
|
|
|||
|
|
@ -11,12 +11,24 @@
|
|||
</a>
|
||||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link text-white active" href="@if (Route::is('home')) {{config('app.url') }}#promotions @else {{ route('products', ['promotion' => true]) }} @endif">Promotions</a>
|
||||
<a class="nav-link text-white" href="@if (Route::is('home')) {{config('app.url') }}#rayons @else {{ route('products') }} @endif">Rayons</a>
|
||||
<a class="nav-link text-white @if (Route::is('home')) d-none @endif d-lg-none" href="{{ route('home') }}">Accueil</a>
|
||||
<a class="nav-link text-white @if (!Route::is('home')) d-none @endif" href="{{ config('app.url') }}#services">Services</a>
|
||||
<a class="nav-link text-white d-lg-none" href="{{ config('app.url') }}#contact">Contact</a>
|
||||
<a class="nav-link text-white d-lg-none" href="{{ config('app.url') }}#faq">FAQ</a>
|
||||
<a class="nav-link"
|
||||
href="@if (Route::is('home')) {{config('app.url') }}#promotions @else {{ route('products', ['promotion' => true]) }} @endif">
|
||||
Promotions
|
||||
</a>
|
||||
<a class="nav-link @if (Route::is('products')) active @endif"
|
||||
href="@if (Route::is('home')) {{config('app.url') }}#rayons @else {{ route('products') }} @endif">
|
||||
Rayons
|
||||
</a>
|
||||
<a class="nav-link @if (Route::is('home')) d-none @endif d-lg-none"
|
||||
f="{{ route('home') }}">
|
||||
Accueil
|
||||
</a>
|
||||
<a class="nav-link @if (!Route::is('home')) d-none @endif"
|
||||
href="{{ config('app.url') }}#services">
|
||||
Services
|
||||
</a>
|
||||
<a class="nav-link d-lg-none" href="{{ config('app.url') }}#contact">Contact</a>
|
||||
<a class="nav-link d-lg-none" href="{{ config('app.url') }}#faq">FAQ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<circle cx="26.8245" cy="8.31185" r="0.72396" fill="#FF4E4E"/>
|
||||
</svg>
|
||||
</a>
|
||||
<div id="ldcweb-banner" class="ldcweb-cn-banner">
|
||||
<div id="ldcweb-banner" class="ldcweb-cn-banner @if (Route::is('product') || Route::is('products')) ldcweb-banner-custom @endif">
|
||||
<div class="ldcweb-banner-content">
|
||||
<div class="ldcweb-banner-img">
|
||||
<img src="{{ asset(config('app.theme')."/img/logo.png")}}" alt="{{ __('Logo - '). Config::get('theme.site_name') }}">
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
@section('title', __('Produit spécifique'))
|
||||
@section('description', 'Produit spécifique de la boutique.')
|
||||
|
||||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main id="product" class="container pt-6 pt-lg-0">
|
||||
<p class="breadcrumb d-none d-lg-block text-muted p-2 m-0">Accueil / Tous les Rayons / Filet de poulet</p>
|
||||
<article class="row row-cols-1 row-cols-md-3 m-0 card-promotion">
|
||||
<article class="row row-cols-1 row-cols-lg-3 m-0 card-promotion">
|
||||
<!-- PRODUCT'S IMAGE -->
|
||||
<div class="p-2">
|
||||
@if (isset($product->picture_large))
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
@endif
|
||||
</div>
|
||||
<!-- PRODUCT'S DESCRIPTION -->
|
||||
<div class="d-flex flex-column-reverse flex-md-column justify-content-between justify-content-md-start align-items-start p-2">
|
||||
<div class="d-flex flex-column-reverse flex-lg-column justify-content-between justify-content-lg-start align-items-start p-2">
|
||||
<div>
|
||||
<h1 class="position-fixed position-lg-relative product-title text-center text-lg-start text-dark m-0">{{ $product->name }}</h1>
|
||||
{!! $product->description !!}
|
||||
|
|
@ -28,23 +29,28 @@
|
|||
@endif
|
||||
<div class="mb-4">
|
||||
<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 : {{ ($product->weight_variable) ? 'oui' : 'non' }}</p>
|
||||
@if ($product->weight_variable)
|
||||
<p class="font-Barlow-medium m-0">Produit poids variable</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-100 d-flex flex-row justify-content-between justify-content-md-start align-items-center">
|
||||
<div class="w-100 d-flex flex-row justify-content-between justify-content-lg-start align-items-center">
|
||||
<img class="card-action-nutriscore m-3" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-" . $product->foodProduct->nutriscore . ".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-action position-fixed position-lg-relative d-flex justify-content-between align-items-center w-100 px-4 px-lg-0">
|
||||
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold">
|
||||
@if ($product->promotions->count())
|
||||
<span class="card-price-original position-relative">@fmt_currency($product->priceTtc)</span>
|
||||
@endif
|
||||
<span class="card-price-new h3">@fmt_currency($product->discountedPriceTtc)</span>
|
||||
<span class="@if ($product->promotions->count()) card-price-new @endif h3 m-0">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
|
||||
</div>
|
||||
@can('addToCart', $product)
|
||||
<basket-buttons :product-id='{{$product->id}}'></basket-buttons>
|
||||
@endcan
|
||||
</div>
|
||||
@if ($product->weight_variable)
|
||||
<p class="fst-italic text-muted">*Prix variable en fonction du poids</p>
|
||||
@endif
|
||||
</div>
|
||||
<!-- PRODUCT'S DETAILS -->
|
||||
<div id="list" class="p-2">
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
@section('title', __('Produits'))
|
||||
@section('description', 'Liste complète des produits de la boutique.')
|
||||
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<main id="ranges" class="container vue-apps">
|
||||
<p class="breadcrumb d-none d-lg-block text-muted p-2 m-0">Accueil / Tous les Rayons</p>
|
||||
@php
|
||||
$dataComponent = [
|
||||
'hasPromotion' => request()->promotion ? true : false,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,25 @@
|
|||
// M::::::M M::::::MD::::::::::::DDD
|
||||
// MMMMMMMM MMMMMMMMDDDDDDDDDDDDD
|
||||
@include media-breakpoint-up(md) { //768px
|
||||
//
|
||||
}
|
||||
// LLLLLLLLLLL GGGGGGGGGGGGG
|
||||
// L:::::::::L GGG::::::::::::G
|
||||
// L:::::::::L GG:::::::::::::::G
|
||||
// LL:::::::LL G:::::GGGGGGGG::::G
|
||||
// L:::::L G:::::G GGGGGG
|
||||
// L:::::L G:::::G
|
||||
// L:::::L G:::::G
|
||||
// L:::::L G:::::G GGGGGGGGGG
|
||||
// L:::::L G:::::G G::::::::G
|
||||
// L:::::L G:::::G GGGGG::::G
|
||||
// L:::::L G:::::G G::::G
|
||||
// L:::::L LLLLLL G:::::G G::::G
|
||||
// LL:::::::LLLLLLLLL:::::L G:::::GGGGGGGG::::G
|
||||
// L::::::::::::::::::::::L GG:::::::::::::::G
|
||||
// L::::::::::::::::::::::L GGG::::::GGG:::G
|
||||
// LLLLLLLLLLLLLLLLLLLLLLLL GGGGGG GGGG
|
||||
@include media-breakpoint-up(lg) { //992px
|
||||
#product {
|
||||
#list {
|
||||
padding-bottom: 1rem;
|
||||
|
|
@ -81,11 +100,11 @@
|
|||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.product-title {
|
||||
top: 0;
|
||||
background-color: transparent;
|
||||
text-transform: lowercase;
|
||||
text-transform: inherit;
|
||||
|
||||
&::first-letter {
|
||||
text-transform: capitalize;
|
||||
|
|
@ -93,25 +112,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// LLLLLLLLLLL GGGGGGGGGGGGG
|
||||
// L:::::::::L GGG::::::::::::G
|
||||
// L:::::::::L GG:::::::::::::::G
|
||||
// LL:::::::LL G:::::GGGGGGGG::::G
|
||||
// L:::::L G:::::G GGGGGG
|
||||
// L:::::L G:::::G
|
||||
// L:::::L G:::::G
|
||||
// L:::::L G:::::G GGGGGGGGGG
|
||||
// L:::::L G:::::G G::::::::G
|
||||
// L:::::L G:::::G GGGGG::::G
|
||||
// L:::::L G:::::G G::::G
|
||||
// L:::::L LLLLLL G:::::G G::::G
|
||||
// LL:::::::LLLLLLLLL:::::L G:::::GGGGGGGG::::G
|
||||
// L::::::::::::::::::::::L GG:::::::::::::::G
|
||||
// L::::::::::::::::::::::L GGG::::::GGG:::G
|
||||
// LLLLLLLLLLLLLLLLLLLLLLLL GGGGGG GGGG
|
||||
@include media-breakpoint-up(lg) { //992px
|
||||
//
|
||||
}
|
||||
// XXXXXXX XXXXXXXLLLLLLLLLLL
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
|
|
@ -149,4 +149,4 @@
|
|||
// XXXXXXX XXXXXXXXXXXXXX XXXXXXXLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
@include media-breakpoint-up(xxl) { //1400px
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -412,8 +412,10 @@
|
|||
/* MEDIA QUERIES */
|
||||
@media (max-width: 992px) {
|
||||
.ldcweb-btn-custom{
|
||||
left: 20px;
|
||||
bottom: 85px;
|
||||
bottom: calc(var(--ldcweb-cn-position-bottom) + 65px) !important;
|
||||
}
|
||||
.ldcweb-banner-custom{
|
||||
bottom: calc(var(--ldcweb-cn-position-bottom) + 125px) !important;
|
||||
}
|
||||
}
|
||||
@media (max-width: 535px) {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ Breadcrumbs::for('products', function ($trail) {
|
|||
$trail->parent('home');
|
||||
$trail->push(__('Tous les produits'), route('products'));
|
||||
});
|
||||
Breadcrumbs::for('product', function ($trail, $product) {
|
||||
$trail->parent('products');
|
||||
$trail->push($product->name, route('product', ['productSlug' => $product->slug]));
|
||||
});
|
||||
Breadcrumbs::for('products.tagfilter', function ($trail, $tag) {
|
||||
$trail->parent('products');
|
||||
$trail->push($tag->label, route('products.tagfilter', ['tagSlug', $tag->slug]));
|
||||
|
|
@ -113,15 +117,3 @@ Breadcrumbs::for('account.order-detail', function ($trail, $reference) {
|
|||
$trail->parent('account.my-orders');
|
||||
$trail->push(__('Détail Commandes'), route('account.order-detail', ['reference', $reference]));
|
||||
});
|
||||
|
||||
// Second level.
|
||||
Breadcrumbs::for('range', function ($trail, $gamme) {
|
||||
$trail->parent('ranges');
|
||||
$trail->push($gamme->name, route('range', ['rangeSlug' => $gamme->slug]));
|
||||
});
|
||||
|
||||
// Third Level.
|
||||
Breadcrumbs::for('product', function ($trail, $product) {
|
||||
$trail->parent('range', $product->range);
|
||||
$trail->push($product->name, route('product', ['productSlug' => $product->slug]));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -99,11 +99,12 @@ Route::get('/produits', [ProductsController::class, 'allProducts'])->name('produ
|
|||
Route::get('/produits/filter', [ProductsController::class, 'allProductsFiltered'])->name('products.filters');
|
||||
// Products tag filter.
|
||||
Route::get('/produits/{tagSlug}', [ProductsController::class, 'tagFiltered'])->name('products.tagfilter');
|
||||
|
||||
Route::get('/recherche', [ProductsController::class, 'allProducts'])->name('search');
|
||||
// Product.
|
||||
Route::get('/produit/{productSlug}', [ProductsController::class, 'product'])->name('product')
|
||||
->middleware('redirect-slugs');
|
||||
|
||||
Route::get('/recherche', [ProductsController::class, 'allProducts'])->name('search');
|
||||
|
||||
// Route ajax pour Single Optin.
|
||||
Route::post('/optin', [HomeController::class, 'addOptIn'])->name('add-single-optin');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue