Merge branch 'develop' into trunk
|
|
@ -43,6 +43,7 @@ MAIL_LIST_INVALIDINCO=equipe.web@ldc.fr,vincent.pierre@ldc.fr,christelle.manceau
|
|||
CRM_ENDPOINT=https://ldcldccrm:K5cJmTsG@dev.ldc-crm.fr
|
||||
# service boutique
|
||||
CRM_TOKEN=
|
||||
CRM_PASSWORD=
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
* @method static self none()
|
||||
* @method static self loue()
|
||||
* @method static self legaulois()
|
||||
* @method static self legauloispro()
|
||||
* @method static self marie()
|
||||
* @method static self tregalette()
|
||||
* @method static self esprirestauration()
|
||||
|
|
@ -29,8 +30,9 @@ class ProductBrand extends BaseEnumRoutable
|
|||
'none' => 'Sans marque',
|
||||
'loue' => 'Loué',
|
||||
'legaulois' => 'Le Gaulois',
|
||||
'legauloispro' => 'Le Gaulois Professionnel',
|
||||
'marie' => 'Marie',
|
||||
'tregalette' => 'Regalette',
|
||||
'tregalette' => 'Trégalette',
|
||||
'esprirestauration' => 'Espri Restauration',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Kwaadpepper\ExceptionHandler\Exceptions\ExceptionHandler;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
|
|
@ -61,37 +59,4 @@ class Handler extends ExceptionHandler
|
|||
// Session::forget('url.intented'); .
|
||||
return redirect()->guest(route($login));
|
||||
}
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* @param \Throwable $e
|
||||
* @return void
|
||||
*/
|
||||
public function report(Throwable $e)
|
||||
{
|
||||
if (get_class($e) == RedirectTo::class) {
|
||||
abort(redirect($e->url));
|
||||
}
|
||||
|
||||
if (config('app.debug') === false) {
|
||||
if ($this->shouldntReport($e)) {
|
||||
return;
|
||||
}
|
||||
Mail::send([
|
||||
'html' => 'emails.exception',
|
||||
'text' => 'emails.exception-plain'
|
||||
], [
|
||||
'exception' => $e,
|
||||
'appName' => config('app.name')
|
||||
], function ($m) {
|
||||
$m->to(
|
||||
config('mail.contactsList.serviceweb'),
|
||||
sprintf('%s Exception Handler', config('app.name'))
|
||||
)->subject('Need help !, an error occured in your application, please check Logs ASAP');
|
||||
});
|
||||
}
|
||||
|
||||
parent::report($e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Lib\Utils;
|
||||
use App\Models\Product;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
|
|
@ -57,7 +58,12 @@ class BasketController extends Controller
|
|||
$instance = $request->instance ?? "panier";
|
||||
$rowId = $request->rowId;
|
||||
Cart::instance($instance);
|
||||
Cart::remove($rowId);
|
||||
try {
|
||||
Cart::remove($rowId);
|
||||
} catch (\Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException $e) {
|
||||
// Attempted to remove a Row which is not in cart anymore.
|
||||
Utils::sendEmailErrorManually($e);
|
||||
}
|
||||
return $this->getCart($instance);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ class RangesController extends Controller
|
|||
{
|
||||
$name = $request->name;
|
||||
$slug = Str::slug($name);
|
||||
$description = $request->description;
|
||||
$description = $request->description != null ? $request->description : null;
|
||||
$picture = $request->picture;
|
||||
$status = $request->status === null ? 0 : 1;
|
||||
|
||||
$request->validate([
|
||||
'name' => 'required|string|max:255',
|
||||
'description' => 'required',
|
||||
'description' => 'sometimes|nullable',
|
||||
'picture' => 'image|mimes:jpeg,png,jpg|max:2048|dimensions:max-width=' .
|
||||
config('theme.range_image_maxwidth') . ',max-height=' .
|
||||
config('theme.range_image_maxheight'),
|
||||
|
|
@ -94,13 +94,13 @@ class RangesController extends Controller
|
|||
{
|
||||
$name = $request->name;
|
||||
$slug = Str::slug($name);
|
||||
$description = $request->description;
|
||||
$description = $request->description != null ? $request->description : null;
|
||||
$picture = $request->picture;
|
||||
$status = $request->status === null ? 0 : 1;
|
||||
|
||||
$request->validate([
|
||||
'name' => 'required|string|max:255',
|
||||
'description' => 'required',
|
||||
'description' => 'sometimes|nullable',
|
||||
'picture' => 'image|mimes:jpeg,png,jpg|max:2048|dimensions:max-width=' .
|
||||
config('theme.range_image_maxwidth') . ',max-height=' .
|
||||
config('theme.range_image_maxheight'),
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\CustomerRegisterRequest;
|
||||
use App\Http\Requests\CustomerUpdatePassword;
|
||||
use App\Http\Requests\LoginRequest;
|
||||
use App\Http\Requests\UpdateInfosRequest;
|
||||
use App\Lib\Utils;
|
||||
use App\Mail\PasswordResetMail;
|
||||
use App\Mail\RegisterConfirmMail;
|
||||
use App\Models\Customers;
|
||||
|
|
@ -400,23 +402,44 @@ class CustomerController extends Controller
|
|||
/**
|
||||
* changement de mot de passe depuis le profil
|
||||
*
|
||||
* @param Request $request
|
||||
* @param CustomerUpdatePassword $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function changePasswordWhenAuthenticated(Request $request)
|
||||
public function changePasswordWhenAuthenticated(CustomerUpdatePassword $request)
|
||||
{
|
||||
$request->validate([
|
||||
'password' => 'required|min:8|confirmed|max:255'
|
||||
]);
|
||||
/** @var \App\Models\Customers */
|
||||
$customer = Auth::guard('customer')->user();
|
||||
|
||||
$crm = app('crmApi');
|
||||
$customer = $crm->changePwdCustomer(Auth::guard('customer')->user()->crm_id, $request->password);
|
||||
/** @var \LDC\LDCCRM\CrmApiV2 */
|
||||
$crm = app('crmAPI');
|
||||
|
||||
if ($customer->status === "OK") {
|
||||
return back()->with('success', __("Modifications enregistrés !"));
|
||||
} else {
|
||||
return back()->withErrors(__("Une erreur est survenue, merci de réessayer ultérieurement."));
|
||||
}
|
||||
// Test old password.
|
||||
try {
|
||||
// Ne devrait pas survenir, $crm->login throws ApiError::authFailed().
|
||||
if (!$crm->login($customer->email, $request->password_old)) {
|
||||
// Mauvais identifiants.
|
||||
return back()->withErrors('L\'ancien mot de passe ne correspond pas.');
|
||||
}
|
||||
|
||||
$crmCustomer = $crm->getCustomer($customer->hashcode);
|
||||
|
||||
$crmCustomer->password = $request->password;
|
||||
$crmCustomer->save();
|
||||
} catch (ApiErrorException $e) {
|
||||
if ($e->getApiError()->equals(ApiError::authFailed())) {
|
||||
return back()->withErrors('L\'ancien mot de passe ne correspond pas.');
|
||||
}
|
||||
Utils::sendEmailErrorManually($e);
|
||||
// Une erreur critique est survenue avec la CRM.
|
||||
return back()->withErrors('Une erreur est survenue, merci de réessayer ultérieurement.');
|
||||
} catch (\TypeError | CrmException $e) {
|
||||
Utils::sendEmailErrorManually($e);
|
||||
// Une erreur critique est survenue avec la CRM.
|
||||
return back()->withErrors('Une erreur est survenue, merci de réessayer ultérieurement.');
|
||||
} catch (ValidationException $e) {
|
||||
return back()->withErrors(sprintf('Nouveau mot de passe : %s', $e->getMessage()));
|
||||
} //end try
|
||||
return back()->with('success', __("Modifications enregistrés !"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class HomeController extends Controller
|
|||
$slider = Slider::where('slug', 'home')->first();
|
||||
$slides = $slider->showableSlides;
|
||||
|
||||
$quickorder_ranges = Range::with('products')->get();
|
||||
$quickorder_ranges = Range::where('status', 1)->with('products')->get();
|
||||
foreach ($quickorder_ranges as $range) {
|
||||
foreach ($range->products as $product) {
|
||||
$product->calculatedPrices = $product->getCalcPrices();
|
||||
|
|
|
|||
|
|
@ -350,13 +350,44 @@ class OrderTunnelController extends Controller
|
|||
'ok_cgv' => 'accepted',
|
||||
]);
|
||||
|
||||
$time_slot = Carbon::createFromFormat('d/m/Y-H:i', $request->selectedcreneau);
|
||||
$tsday = explode('-', $request->selectedcreneau)[0];
|
||||
$tstime = explode('-', $request->selectedcreneau)[1];
|
||||
$magasin_id = $request->selectedmagasin;
|
||||
$reference = $request->order_ref;
|
||||
$order = Order::where('reference', '=', $reference)->firstOrFail();
|
||||
|
||||
// Check total price of this customer commands for a specific delivery day.
|
||||
$date = CarbonImmutable::create(
|
||||
explode('/', $tsday)[2],
|
||||
explode('/', $tsday)[1],
|
||||
explode('/', $tsday)[0]
|
||||
);
|
||||
$start = $date->startOfWeek(Carbon::MONDAY);
|
||||
$end = $date->endOfWeek(Carbon::SUNDAY);
|
||||
$customerOrders = Order::where('customer_id', '=', $order->customer_id)
|
||||
->where('status_id', '=', 3)
|
||||
->get();
|
||||
$totalPrice = 0;
|
||||
foreach ($customerOrders as $key => $customerOrder) {
|
||||
$timeslot_day = Carbon::createFromFormat('d/m/Y', $customerOrder->timeslot->day);
|
||||
if (
|
||||
$timeslot_day >= $start &&
|
||||
$timeslot_day <= $end
|
||||
) {
|
||||
$totalPrice += $customerOrder->total;
|
||||
}
|
||||
}
|
||||
if ($totalPrice > 200) {
|
||||
return redirect()->route('account.order-detail', ['reference' => $order->reference])
|
||||
->with('message', 'Le montant total pour cette date de livraison est dépassé (200€ maximum).
|
||||
Veuillez modifier cette dernière pour la valider.');
|
||||
}
|
||||
if ($order->total > 200) {
|
||||
return redirect()->route('account.order-detail', ['reference' => $order->reference])
|
||||
->with('message', 'Le montant total de cette commande est dépassé (200€ maximum).
|
||||
Veuillez modifier cette dernière pour la valider.');
|
||||
}
|
||||
|
||||
if ($order->status_id == 1) {
|
||||
// On ne traite l'enregistrement que pour les commandes en attente venant de l'étape de récap.
|
||||
// Save timeslot.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use App\Http\Resources\ProductResource;
|
|||
use App\Models\Product;
|
||||
use App\Models\Range;
|
||||
use App\Models\Tag;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProductsController extends Controller
|
||||
|
|
@ -81,87 +80,92 @@ class ProductsController extends Controller
|
|||
return view('product', compact('product', 'associated'));
|
||||
}
|
||||
|
||||
/**
|
||||
* tous les produits
|
||||
* recherche par nom de produit
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*
|
||||
*/
|
||||
public function allProducts(Request $request)
|
||||
{
|
||||
$filter = $request->query('filter');
|
||||
if (!empty($filter)) {
|
||||
$products = Product::where('status', 1)
|
||||
->where('name', 'like', '%' . $filter . '%')
|
||||
->paginate(12);
|
||||
} else {
|
||||
$products = Product::where('status', 1)->paginate(12);
|
||||
}
|
||||
$search_title = 'Recherche : ' . $filter;
|
||||
|
||||
$ranges = Range::all();
|
||||
$tags = Tag::where('status', true)->get();
|
||||
|
||||
return view('ranges', compact('products', 'ranges', 'tags', 'search_title', 'filter'));
|
||||
}
|
||||
|
||||
/**
|
||||
* tous les produits
|
||||
* filtrage par tag
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $tag_slug
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed
|
||||
*/
|
||||
public function tagFiltered(Request $request, string $tag_slug)
|
||||
{
|
||||
// @phpcs:enable
|
||||
$products = Product::where('status', 1)
|
||||
->whereHas('tags', function ($q) use ($tag_slug) {
|
||||
$q->where('slug', '=', $tag_slug);
|
||||
})
|
||||
->paginate(12);
|
||||
|
||||
$tag = Tag::where('slug', $tag_slug)->firstOrFail();
|
||||
$search_title = $tag->label;
|
||||
|
||||
return view('ranges', compact('products', 'search_title', 'tag'));
|
||||
}
|
||||
|
||||
/**
|
||||
* tous les produits filtrés
|
||||
*
|
||||
* @param \App\Http\Requests\ProductsFilterRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return \Illuminate\Http\JsonResponse|\Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function allProductsFiltered(ProductsFilterRequest $request): JsonResponse
|
||||
public function allProductsFiltered(ProductsFilterRequest $request)
|
||||
{
|
||||
$productfilters = array();
|
||||
|
||||
if (!empty($request->search)) {
|
||||
$productfilters['search'] = $request->search;
|
||||
}
|
||||
|
||||
if (!empty($request->ranges)) {
|
||||
$productfilters['ranges'] = $request->ranges;
|
||||
}
|
||||
|
||||
if (!empty($request->promotion)) {
|
||||
$productfilters['promotions'] = $request->promotion;
|
||||
}
|
||||
|
||||
if (!empty($request->tags)) {
|
||||
$productfilters['tags'] = $request->tags;
|
||||
}
|
||||
|
||||
if (!empty($request->brands)) {
|
||||
$productfilters['brands'] = $request->brands;
|
||||
}
|
||||
|
||||
if (!$request->ajax()) {
|
||||
if (\session()->has("productfilters")) {
|
||||
$sessionFilter = \session()->get("productfilters");
|
||||
$productfilters = \array_merge((array)$sessionFilter, $productfilters);
|
||||
}
|
||||
}
|
||||
|
||||
\session()->put("productfilters", (object)$productfilters);
|
||||
\session()->save();
|
||||
$sessionFilter = \session()->get("productfilters");
|
||||
|
||||
/** @var Illuminate\Database\Eloquent\Builder */
|
||||
$productsQuery = $this->buildFilterQuery($sessionFilter);
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Collection<\App\Models\Product> */
|
||||
$products = $productsQuery->paginate(6);
|
||||
|
||||
if ($request->ajax()) {
|
||||
return \response()->json(ProductResource::collection($products));
|
||||
} else {
|
||||
$ranges = Range::all();
|
||||
$tags = Tag::where('status', true)->get();
|
||||
return view('ranges', compact('products', 'ranges', 'tags', 'sessionFilter'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build filtering Query
|
||||
*
|
||||
* @param object $sessionFilter
|
||||
* @return Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function buildFilterQuery(object $sessionFilter)
|
||||
{
|
||||
/** @var Illuminate\Database\Eloquent\Builder */
|
||||
$productsQuery = Product::where('status', true);
|
||||
if (!empty($request->promotion)) {
|
||||
if (!empty($sessionFilter->search)) {
|
||||
$productsQuery->where('name', 'LIKE', '%' . $sessionFilter->search . '%');
|
||||
}
|
||||
if (!empty($sessionFilter->promotion)) {
|
||||
$productsQuery->whereHas('promotions');
|
||||
}
|
||||
if (!empty($request->ranges)) {
|
||||
$productsQuery->whereHas('range', function ($q) use ($request) {
|
||||
$q->whereIn('id', $request->ranges);
|
||||
if (!empty($sessionFilter->ranges)) {
|
||||
$productsQuery->whereHas('range', function ($q) use ($sessionFilter) {
|
||||
$q->whereIn('id', $sessionFilter->ranges);
|
||||
});
|
||||
}
|
||||
if (!empty($request->tags)) {
|
||||
$productsQuery->whereHas('tags', function ($q) use ($request) {
|
||||
$q->whereIn('id', $request->tags);
|
||||
if (!empty($sessionFilter->tags)) {
|
||||
$productsQuery->whereHas('tags', function ($q) use ($sessionFilter) {
|
||||
$q->whereIn('id', $sessionFilter->tags);
|
||||
});
|
||||
}
|
||||
if (!empty($request->brands)) {
|
||||
$productsQuery->whereIn('brand', $request->brands);
|
||||
if (!empty($sessionFilter->brands)) {
|
||||
$productsQuery->whereIn('brand', $sessionFilter->brands);
|
||||
}
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Collection<\App\Models\Product> */
|
||||
$products = $productsQuery->get();
|
||||
|
||||
return \response()->json(ProductResource::collection($products));
|
||||
return $productsQuery;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
40
app/Http/Requests/CustomerUpdatePassword.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
|
||||
class CustomerUpdatePassword extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return \auth('customer')->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'password_old' => 'required',
|
||||
'password' => [
|
||||
'required', 'confirmed', 'min:8', 'max:255',
|
||||
Password::min(8)
|
||||
->mixedCase()
|
||||
->letters()
|
||||
->numbers()
|
||||
->symbols()
|
||||
->uncompromised()
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,7 @@ class ProductResource extends JsonResource
|
|||
self::$skeleton
|
||||
),
|
||||
['priceTtc' => $this->product->priceTtc],
|
||||
['priceKgTtc' => $this->product->priceKgTtc],
|
||||
['discountedPriceTtc' => $this->product->discountedPriceTtc],
|
||||
['promotion' => (isset($this->product->promotions[0])) ? $this->product->promotions : null],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Range;
|
||||
use App\Models\Tag;
|
||||
use App\Models\Product;
|
||||
use Exception;
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
|
@ -58,9 +57,6 @@ class RefreshSiteMap implements ShouldQueue
|
|||
'range' => [
|
||||
'rangeSlug' => [Range::class, 'slug']
|
||||
],
|
||||
'products.tagfilter' => [
|
||||
'tagSlug' => [Tag::class, 'slug']
|
||||
],
|
||||
'product' => [
|
||||
'productSlug' => [Product::class, 'slug']
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
namespace App\Lib;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Throwable;
|
||||
|
||||
class Utils
|
||||
{
|
||||
/**
|
||||
|
|
@ -22,4 +26,100 @@ class Utils
|
|||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually send an exception to team instead of going trough the error handler
|
||||
* (requires package kwaadpepper/exception-handler)
|
||||
*
|
||||
* @param Throwable $e
|
||||
* @return void
|
||||
*/
|
||||
public static function sendEmailErrorManually(Throwable $e)
|
||||
{
|
||||
Mail::send([
|
||||
'html' => 'exception-handler::emails.exception',
|
||||
'text' => 'exception-handler::emails.exception-plain'
|
||||
], [
|
||||
'appName' => config('app.name'),
|
||||
'code' => $e->getCode(),
|
||||
'line' => $e->getLine(),
|
||||
'ename' => \get_class($e),
|
||||
'emessage' => self::getAnonymizedMessage($e->getMessage()),
|
||||
'file' => str_replace(\realpath(\sprintf('%s/../', \app_path())), '', $e->getFile()),
|
||||
'stackTrace' => self::getAnonymizedStackTrace($e),
|
||||
'uri' => app()->runningInConsole() ?
|
||||
'CONSOLE' : (
|
||||
(request() and request()->fullUrl()) ?
|
||||
request()->fullUrl() : 'none')
|
||||
], function ($m) {
|
||||
/** @var \Illuminate\Mail\Message $m */
|
||||
$m->to(
|
||||
config('mail.contactsList.serviceweb'),
|
||||
sprintf('%s Exception Handler', config('app.name'))
|
||||
)->subject('Need help !, an error occured in your application, please check Logs ASAP');
|
||||
});
|
||||
Log::alert(sprintf('Envoie d\'une erreur par mail : %s', json_encode($e)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Anonymize at least Sql queries
|
||||
*
|
||||
* @param string $message
|
||||
* @return string
|
||||
*/
|
||||
private static function getAnonymizedMessage(string $message): string
|
||||
{
|
||||
$message = \preg_replace('/^(.*)( \(SQL:.*\))$/', '$1', $message) ?? $message;
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Anonymize stack trace
|
||||
*
|
||||
* @param Throwable $e
|
||||
* @return string
|
||||
*/
|
||||
private static function getAnonymizedStackTrace(Throwable $e): string
|
||||
{
|
||||
$projectPath = \realpath(\sprintf('%s/../', \app_path()));
|
||||
$traceStack = $e->getTrace();
|
||||
$traceStr = '';
|
||||
$maxStackStage = 0;
|
||||
foreach ($traceStack as $stackStage => $stack) {
|
||||
$maxStackStage = $stackStage;
|
||||
$traceStr .= \sprintf(
|
||||
'#%s %s(%d): ',
|
||||
$stackStage,
|
||||
str_replace($projectPath, '', $stack['file']),
|
||||
$stack['line']
|
||||
);
|
||||
$traceStr .= "{$stack['class']}->{$stack['function']}(";
|
||||
$traceArgs = '';
|
||||
if (isset($stack['args'])) {
|
||||
$argsCount = count($stack['args']);
|
||||
for ($i = 0; $i < $argsCount; $i++) {
|
||||
$type = \gettype($stack['args'][$i]);
|
||||
switch ($type) {
|
||||
case 'object':
|
||||
$traceArgs .= sprintf('Object(%s)', \get_class($stack['args'][$i]));
|
||||
break;
|
||||
case 'array':
|
||||
$traceArgs .= sprintf('Array(%d)', \count($stack['args'][$i]));
|
||||
break;
|
||||
case 'string':
|
||||
$traceArgs .= sprintf('String(%d)', \strlen($stack['args'][$i]));
|
||||
break;
|
||||
default:
|
||||
$traceArgs .= \gettype($stack['args'][$i]);
|
||||
}
|
||||
$traceArgs .= ($i !== ($argsCount - 1) ? ',' : '');
|
||||
}
|
||||
$traceStr .= $traceArgs;
|
||||
} //end if
|
||||
$traceStr .= ")\n";
|
||||
} //end foreach
|
||||
$maxStackStage++;
|
||||
$traceStr .= "#$maxStackStage {main}";
|
||||
return $traceStr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,13 @@ class Product extends Model implements Buyable
|
|||
*/
|
||||
protected $priceHt;
|
||||
|
||||
/**
|
||||
* Base Price
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
protected $priceKgTtc;
|
||||
|
||||
/**
|
||||
* Base Price after discount
|
||||
*
|
||||
|
|
@ -101,6 +108,7 @@ class Product extends Model implements Buyable
|
|||
// On data retrived from DB.
|
||||
static::retrieved(function ($model) {
|
||||
$model->priceHt = $model->getPriceHtAttribute();
|
||||
$model->priceKgTtc = $model->getPriceKgTtcAttribute();
|
||||
$model->priceTtc = $model->getPriceTtcAttribute();
|
||||
$model->discountAmount = $model->getDiscountAmountAttribute();
|
||||
$model->discountRate = $model->getDiscountRateAttribute();
|
||||
|
|
@ -127,6 +135,7 @@ class Product extends Model implements Buyable
|
|||
{
|
||||
$prices = array(
|
||||
'priceHt' => $this->priceHt,
|
||||
'priceKgTtc' => $this->priceKgTtc,
|
||||
'discountAmount' => $this->discountAmount,
|
||||
'discountRate' => $this->discountRate,
|
||||
'discountedPriceHt' => $this->discountedPriceHt,
|
||||
|
|
@ -188,6 +197,37 @@ class Product extends Model implements Buyable
|
|||
}//end if
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for price by weight
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getPriceKgTtcAttribute()
|
||||
{
|
||||
if (isset($this->priceKgTtc)) {
|
||||
$showPrice = $this->priceKgTtc;
|
||||
} else {
|
||||
$priceKgTtc = $this->attributes['price'] * (1 + ($this->tax->rate / 100));
|
||||
/**
|
||||
* On travaille avec des centimes puis on redivise par 100 pour avoir des unités monetaires
|
||||
* on augmente la précision à 3 digits, l'affichage formate les prix sur 2 décimales
|
||||
*/
|
||||
$this->priceKgTtc = round($priceKgTtc * 1000) / 1000;
|
||||
$showPrice = $this->priceKgTtc;
|
||||
}
|
||||
|
||||
// Prix transmis en fonction du setting show_prices.
|
||||
if (config('bosettings.show_prices_authenticated') == "authenticated") {
|
||||
if (Auth::guard('customer')->check()) {
|
||||
return $showPrice;
|
||||
}
|
||||
}
|
||||
if (config('bosettings.show_prices_guest') == "guest") {
|
||||
return $showPrice;
|
||||
}
|
||||
return "-.--";
|
||||
}
|
||||
|
||||
/**
|
||||
* setter for dicounted price
|
||||
*
|
||||
|
|
@ -277,11 +317,9 @@ class Product extends Model implements Buyable
|
|||
}
|
||||
// Prix transmis en fonction du setting show_prices.
|
||||
if (config('bosettings.show_prices_authenticated') == "authenticated") {
|
||||
{
|
||||
if (Auth::guard('customer')->check()) {
|
||||
return $showPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (config('bosettings.show_prices_guest') == "guest") {
|
||||
return $showPrice;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
Blade::directive('fmt_currency', function ($expression) {
|
||||
return "<?php
|
||||
if(is_float($expression)) {
|
||||
echo sprintf('%s € TTC', number_format($expression, 2, ',', ' '));
|
||||
echo sprintf('%s €', number_format($expression, 2, ',', ' '));
|
||||
} else {
|
||||
echo $expression;
|
||||
} ?>";
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"kwaadpepper/enum": "^2.0.0",
|
||||
"kwaadpepper/exception-handler": "^0.1.0",
|
||||
"laravel/framework": "^8.12",
|
||||
"laravel/tinker": "^2.5",
|
||||
"ldc/ldccrmv2client": "^3.0",
|
||||
|
|
|
|||
63
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7011b3ec6ca329a4d4d5cb3bdeaac351",
|
||||
"content-hash": "895507e8a27256f31399e18f2655aece",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
|
@ -1331,6 +1331,67 @@
|
|||
},
|
||||
"time": "2022-07-28T14:19:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kwaadpepper/exception-handler",
|
||||
"version": "0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Kwaadpepper/exception-handler.git",
|
||||
"reference": "36403e6245ea4a2d93d07cafa3409107a0b16f61"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Kwaadpepper/exception-handler/zipball/36403e6245ea4a2d93d07cafa3409107a0b16f61",
|
||||
"reference": "36403e6245ea4a2d93d07cafa3409107a0b16f61",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "~7|~8|~9",
|
||||
"laravel/framework": "~7|~8|~9"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^6.13",
|
||||
"phpunit/phpunit": "~9.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Kwaadpepper\\ExceptionHandler\\ExceptionHandlerServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Kwaadpepper\\ExceptionHandler\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jérémy Munsch",
|
||||
"email": "github@jeremydev.ovh",
|
||||
"homepage": "https://jeremydev.ovh"
|
||||
}
|
||||
],
|
||||
"description": "Send emails when exceptions occurs",
|
||||
"homepage": "https://github.com/kwaadpepper/exception-handler",
|
||||
"keywords": [
|
||||
"email",
|
||||
"exception",
|
||||
"laravel",
|
||||
"policies"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Kwaadpepper/exception-handler/issues",
|
||||
"source": "https://github.com/Kwaadpepper/exception-handler/tree/0.1.0"
|
||||
},
|
||||
"time": "2022-08-22T15:14:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v8.83.23",
|
||||
|
|
|
|||
15
config/exception-handler.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/**
|
||||
* Send mail when app debug is turn off
|
||||
* so you can be warned if an unhandled exception occurs
|
||||
*/
|
||||
'enableMaiLog' => !config('app.debug'),
|
||||
|
||||
/**
|
||||
* Put a developper secured mailbox in here
|
||||
* so you can receive email if things go mad
|
||||
*/
|
||||
'contactsList' => explode(',', env('MAIL_LIST_SERVICEWEB'))
|
||||
];
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterRangesDescriptionTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ranges', function (Blueprint $table) {
|
||||
$table->text('description')->default(null)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ranges', function (Blueprint $table) {
|
||||
$table->text('description')->default(null)->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -43,12 +43,12 @@
|
|||
type="text"
|
||||
name="matricule"
|
||||
placeholder="Matricule*"
|
||||
value="{{ old('matricule') }}" required/>
|
||||
value="{{ old('matricule') }}"/>
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="text"
|
||||
name="code"
|
||||
placeholder="Code d'inscription*"
|
||||
value="{{ old('code') }}" required/>
|
||||
value="{{ old('code') }}"/>
|
||||
</div>
|
||||
</div>
|
||||
@elseif (config('bosettings.register_salaries') && !config('bosettings.register_public'))
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
<div class="text-center fst-italic my-2">*Champs obligatoires</div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button class="btn btn-product rounded-4">S'inscrire</button>
|
||||
<button class="btn btn-product rounded-4" type="submit">S'inscrire</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@unless ($breadcrumbs->isEmpty())
|
||||
<div class="container pt-2">
|
||||
<section class="d-none d-lg-block pt-2">
|
||||
<div class="row ps-5">
|
||||
<div class="col ps-5">
|
||||
<div class="breadrumbs content ps-5">
|
||||
|
|
@ -21,5 +21,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endunless
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login d-flex flex-column justify-content-center container">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">{!! $content->title !!}</h1>
|
||||
<section class="auth-login d-flex flex-column justify-content-center">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{!! $content->title !!}</h1>
|
||||
<div class="row justify-content-around">
|
||||
<div class="col-12 col-lg-6 p-0 font-Barlow-bold">
|
||||
@if ($content !== null)
|
||||
|
|
@ -116,5 +116,5 @@
|
|||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">Mon compte</h2>
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Mon compte</h2>
|
||||
<div class="row">
|
||||
<div class="col d-flex justify-content-center align-items-end text-center p-0">
|
||||
<div class="row">
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center mt-2">Mes coordonnées</h2>
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center mt-2">Mes coordonnées</h2>
|
||||
<p class="text-center m-0">Pour modifier vos informations personnelles,</p>
|
||||
<p class="text-center">il vous suffit de renseigner vos nouvelles données dans le formulaire ci-dessous :</p>
|
||||
<form action="{{ route('account.update-infos') }}" method="POST" class="mx-auto">
|
||||
|
|
@ -131,10 +131,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center mt-2">Mot de passe</h2>
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center mt-2">Mot de passe</h2>
|
||||
<form method="post" action="{{ route('account.change-password') }}" class="mx-auto">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="password"
|
||||
name="password_old"
|
||||
placeholder="Ancien mot de passe"
|
||||
value="{{ old('password_old') }}" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex justify-content-center align-items-center text-center p-0">
|
||||
<input class="w-50 form-control rounded-4 border-dark"
|
||||
type="password"
|
||||
|
|
|
|||
|
|
@ -4,35 +4,43 @@
|
|||
@section('description', 'Récapitulatif de vos commandes.')
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<h1 class="title">Mes Commandes</h1>
|
||||
<div class="section section_white">
|
||||
<div class="wrapper-inner">
|
||||
<div class="order_recap">
|
||||
@if(count($orders) > 0)
|
||||
<!--start header-->
|
||||
<div class="order_recap__header order_recap_action"></div>
|
||||
<div class="order_recap__header order_recap_designation">Référence</div>
|
||||
<div class="order_recap__header order_recap_quantite">Date</div>
|
||||
<div class="order_recap__header order_recap_unitprice">Total en €</div>
|
||||
<div class="order_recap__header order_recap_totalprice">Statut</div>
|
||||
<!--end header-->
|
||||
@foreach ($orders as $order)
|
||||
<div class="order_recap__row order_recap_action">
|
||||
{{--<a href="{{route('account.order-detail', $order->reference)}}" class="btn btn-sm btn-primary">Détails</a>--}}
|
||||
</div>
|
||||
<div class="order_recap__row order_recap_designation">
|
||||
<a href="{{route('account.order-detail', $order->reference)}}" class="btn btn-sm btn-primary">{{$order->reference}}</a>
|
||||
</div>
|
||||
<div class="order_recap__row order_recap_quantite">
|
||||
{{\Carbon\Carbon::parse($order->date)->format('d/m/Y')}}
|
||||
</div>
|
||||
<div class="order_recap__row order_recap_unitprice">@fmt_currency($order->total)</div>
|
||||
<div class="order_recap__row order_recap_totalprice">{{$order->status->label}}</div>
|
||||
@endforeach
|
||||
@else
|
||||
<p>Vous n'avez aucunes commandes</p>
|
||||
@endif
|
||||
<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-grey text-center">Mes Commandes</h1>
|
||||
<div class="section section_white">
|
||||
<div class="wrapper-inner">
|
||||
<div class="order_recap">
|
||||
@if(count($orders) > 0)
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr class="border-bottom border-dark border-2 font-Barlow-medium">
|
||||
<th scope="col" class="text-center align-middle">Référence</th>
|
||||
<th scope="col" class="text-center align-middle">Date</th>
|
||||
<th scope="col" class="text-center align-middle">Total en €</th>
|
||||
<th scope="col" class="text-center align-middle">Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($orders as $order)
|
||||
<tr>
|
||||
<th scope="col" class="text-center align-middle">
|
||||
<a href="{{route('account.order-detail', $order->reference)}}" class="btn btn-product rounded-4">{{$order->reference}}</a>
|
||||
</th>
|
||||
<th scope="col" class="text-center align-middle">
|
||||
{{\Carbon\Carbon::parse($order->date)->format('d/m/Y')}}
|
||||
</th>
|
||||
<th scope="col" class="text-center align-middle">@fmt_currency($order->total)</th>
|
||||
<th scope="col" class="text-center align-middle">{{ $order->status->label }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<p class="text-center">Vous n'avez aucunes commandes</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,38 +6,72 @@
|
|||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<h1 class="title">Détail de votre commande du {{\Carbon\Carbon::parse($order->date)->format('d/m/Y')}}</h1>
|
||||
<div class="section">
|
||||
<div class="wrapper-inner">
|
||||
<div class="recap_order">
|
||||
<div class="message center">Etat de votre commande : {{$order->status->label}}</div>
|
||||
<div class="order__identification">Rappel de votre commande ref: {{ $order->reference }}</div>
|
||||
@foreach ($order->lines as $line)
|
||||
<div class="order__line">
|
||||
<div class="qtt">{{ $line->quantity }} x</div>
|
||||
<div class="designation">{{ $line->product->name }}</div>
|
||||
<div class="price">{{ $line->formattedTotalTtc }}</div>
|
||||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col p-0 my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">Détail de votre commande du {{\Carbon\Carbon::parse($order->date)->format('d/m/Y')}}</h1>
|
||||
<p class="text-center">réf: {{ $order->reference }}</p>
|
||||
<div class="section">
|
||||
<div class="wrapper-inner">
|
||||
<div class="recap_order">
|
||||
@if (\Session::has('message'))
|
||||
<div class="w-100 text-red text-center">
|
||||
{!! \Session::get('message') !!}
|
||||
</div>
|
||||
@endif
|
||||
<table class="table">
|
||||
<thead class="border-bottom border-dark">
|
||||
<tr class="font-Barlow-medium">
|
||||
<th scope="col" class="text-center align-middle">Etat de votre commande</th>
|
||||
<th scope="col" class="text-center align-middle">Rappel de votre commande</th>
|
||||
<th scope="col" class="text-center align-middle">Prix au KG TTC</th>
|
||||
<th scope="col" class="text-center align-middle">Prix à la pièce TTC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="border-0">
|
||||
<td scope="col" class="border-0 text-center align-middle">
|
||||
{{ $order->status->label }}
|
||||
</td>
|
||||
<td scope="col" class="border-0 text-start">
|
||||
@foreach ($order->lines as $line)
|
||||
<p class="m-0">{{ $line->quantity }} x {{ $line->product->name }}</p>
|
||||
@endforeach
|
||||
</td>
|
||||
<td scope="col" class="border-0 text-center">
|
||||
@foreach ($order->lines as $line)
|
||||
<p class="m-0 @if (!$line->product->weight_variable) opacity-0 @endif">@fmt_currency($line->product->priceKgTtc)</p>
|
||||
@endforeach
|
||||
</td>
|
||||
<td scope="col" class="border-0 text-center">
|
||||
@foreach ($order->lines as $line)
|
||||
<p class="m-0">@fmt_currency($line->product->discountedPriceTtc)</p>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-top border-dark">
|
||||
<td class="border-0"></td>
|
||||
<td class="border-0"></td>
|
||||
<td class="border-0"></td>
|
||||
<td class="border-0 text-end align-middle p-0 p-lg-2">
|
||||
<span>Total estimé TTC</span>
|
||||
<span class="title-small font-Barlow-extra-bold ms-5">{{ $order->formattedTotalTtc }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@if (!empty($order->timeslot))
|
||||
<p>
|
||||
A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l'adresse suivante :</br>
|
||||
<b>Mon point de retrait {{$magasin->name}}, {{$magasin->address}}, {{$magasin->postcode}} {{$magasin->city}}</b>
|
||||
</p>
|
||||
@else
|
||||
<div class="w-100 text-center">
|
||||
<a href="{{ route('sales.pick-slot', ['reference' => $order->reference]) }}" class="btn btn-product rounded-4">Modifier votre commande</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="order_total">
|
||||
<div>Total</div>
|
||||
<div>{{ $order->formattedTotalTtc }}</div>
|
||||
</div>
|
||||
@if (!empty($order->timeslot))
|
||||
<div class="message">
|
||||
A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l’adresse suivante :</br>
|
||||
<b>Mon point de retrait {{$magasin->name}}, {{$magasin->address}}, {{$magasin->postcode}} {{$magasin->city}}</b>
|
||||
</div>
|
||||
@else
|
||||
<div class="message">
|
||||
<a href="{{ route('sales.pick-slot', ['reference' => $order->reference]) }}" class="btn btn-sm btn-primary">Choisir où et quand retirer votre commande</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
{{--<a class="btn " href="#">Voir l'itinéraire</a>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login container d-flex justify-content-center align-items-start">
|
||||
<section class="auth-login d-flex justify-content-center align-items-start">
|
||||
<div class="row w-100">
|
||||
<div class="col my-5">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-white text-center">{{ $content->value }}</h1>
|
||||
<div class="col">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ $content->value }}</h1>
|
||||
@if ($content !== null)
|
||||
@foreach ($faq as $key => $f)
|
||||
<div class="row mt-2">
|
||||
|
|
@ -28,5 +28,5 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -6,49 +6,38 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<!-- SLIDER -->
|
||||
<article id="home-slider" class="row p-2 gx-0">
|
||||
<div class="swiper-container p-0 h-100">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($slides as $slide)
|
||||
<a class="swiper-slide d-flex justify-content-center align-items-center text-decoration-none px-2 px-md-5" href="{{ $slide->link }}">
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-center text-white px-2 px-md-5">{{ $slide->title }}</h2>
|
||||
<img class="px-md-5" src="{{ asset('/images/slides/' . $slide->picture) }}">
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="swiper-button-next rounded-circle d-none d-md-flex mx-4"></div>
|
||||
<div class="swiper-button-prev rounded-circle d-none d-md-flex mx-4"></div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<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 -->
|
||||
<section class="vue-apps">
|
||||
<!-- PROMOTIONS OU MISE EN AVANT OU SÉLECTION DU MOMENT -->
|
||||
<article id="promotions" class="text-center">
|
||||
<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 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">
|
||||
<div class="row rounded-4 m-2 p-3 m-0 position-relative card w-100 h-100" role="button">
|
||||
<div class="col-lg-4 p-0 w-100 h-100">
|
||||
<div class="position-relative h-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="h-100 mw-100" alt="{{ $product->name }}">
|
||||
</div>
|
||||
<div class="card-body d-flex flex-column justify-content-center align-items-center h-lg-50 px-3">
|
||||
<div class="card-body d-flex flex-column justify-content-between align-items-center h-lg-50 px-3">
|
||||
<h5 class="font-Barlow-bold m-2 mb-0">
|
||||
<a class="text-decoration-none text-dark stretched-link" href="{{ route('product', $product->slug) }}">{{ $product->name }}</a>
|
||||
</h5>
|
||||
<div class="card-price d-flex justify-content-center align-items-center font-Barlow-bold m-2 m-lg-0 my-lg-4">
|
||||
@if ($product->promotions->count())
|
||||
<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_without_ttc($product->discountedPriceTtc)</span>
|
||||
<div class="card-text text-center w-100">
|
||||
{!! $product->description !!}
|
||||
</div>
|
||||
@if ($product->weight_variable)
|
||||
<p class="fst-italic text-muted">*Prix variable en fonction du poids</p>
|
||||
@endif
|
||||
<div class="card-price d-flex justify-content-center align-items-center m-2 mx-0">
|
||||
{{-- @if ($product->promotions->count())
|
||||
<span class="card-price-original position-relative me-2">@fmt_currency_without_ttc($product->priceTtc)</span>
|
||||
@endif --}}
|
||||
<p class="card-price-new {{-- @if ($product->promotions->count()) text-red @endif --}}">
|
||||
<span>@if ($product->weight_variable) Environ* @endif</span>
|
||||
<span class="font-Barlow-bold h4">@fmt_currency($product->discountedPriceTtc)</span>
|
||||
<span class="text-lowercase">/{{ $product->sell_unit }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<p class="fst-italic text-muted @if (!$product->weight_variable) opacity-0 @endif">*Produit vendu au kilo : @fmt_currency($product->priceKgTtc)/kg</p>
|
||||
<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") }}">
|
||||
@can('addToCart', $product)
|
||||
|
|
@ -62,10 +51,10 @@
|
|||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="swiper-button-next rounded-2 d-none d-md-flex"></div>
|
||||
<div class="swiper-button-prev rounded-2 d-none d-md-flex"></div>
|
||||
<div class="swiper-button-next rounded-2 d-none d-lg-flex"></div>
|
||||
<div class="swiper-button-prev rounded-2 d-none d-lg-flex"></div>
|
||||
</div>
|
||||
<a href="{{ route('products', ['promotion' => true]) }}" class="btn btn-section font-Barlow-bold text-uppercase rounded-4 w-75">voir toutes les offres</a>
|
||||
<a href="{{ route('products') }}" class="btn btn-section font-Barlow-bold text-uppercase rounded-4 w-75">voir toutes les offres</a>
|
||||
</article>
|
||||
|
||||
<!-- RANGES -->
|
||||
|
|
@ -80,10 +69,10 @@
|
|||
<img src="{{ asset('/images/gammes/' . $quickorder_range->picture) }}" class="img-fluid" alt="...">
|
||||
</div>
|
||||
<div class="w-100 w-md-50 px-0 m-0">
|
||||
<div class="card-body h-100 d-flex flex-column justify-content-center align-items-center align-items-md-start text-center text-md-start mx-md-2">
|
||||
<div class="card-body h-100 d-flex flex-column justify-content-center align-items-center align-items-md-start text-center text-md-start mt-2 m-md-0 ms-md-3">
|
||||
<h5 class="font-Barlow-extra-bold">{{ $quickorder_range->name }}</h5>
|
||||
{!! $quickorder_range->description !!}
|
||||
<a href="{{ route('products', ['ranges[]' => $quickorder_range->id]) }}" class="btn btn-product text-white rounded-4 stretched-link">Voir le rayon</a>
|
||||
<a href="{{ route('products') }}?ranges[]={{$quickorder_range->id}}" class="btn btn-product text-white rounded-4 font-Barlow-bold text-uppercase stretched-link">Voir le rayon</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filtre position-absolute bottom-0 start-0 w-100 h-75 rounded-4"></div>
|
||||
|
|
@ -94,84 +83,85 @@
|
|||
<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">
|
||||
<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">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_1.png') }}" class="card-img-top" alt="Illustration d'un 'large choix'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Sélectionner</h5>
|
||||
<p class="m-0">vos produits en ligne</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-block m-0 align-self-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/steps-arrow.png') }}" class="card-img-top h-100" alt="Illustration des 'économies'">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card h-100 d-flex flex-column justify-content-center align-items-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_2.png') }}" class="card-img-top" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Choisissez</h5>
|
||||
<p class="m-0">votre créneau horaire</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-block m-0 align-self-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/steps-arrow.png') }}" class="card-img-top h-100"
|
||||
alt="Illustration de 'fraicheur et qualité'">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card h-100 d-flex flex-column justify-content-center align-items-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_3.png') }}" class="card-img-top" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Retirez</h5>
|
||||
<p class="m-0">votre commande</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SERVICES -->
|
||||
<div id="avantages" class="row row-cols-1 row-cols-md-4">
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_1.png") }}" class="card-img-top w-lg-100" alt="Illustration d'un 'large choix'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Un large choix</h5>
|
||||
<p class="m-0">Des produits de qualité, des préparations variées, des quantités adaptées...</p>
|
||||
<article id="services" class="text-center">
|
||||
<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">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_1.png') }}" class="card-img-top" alt="Illustration d'un 'large choix'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Sélectionner</h5>
|
||||
<p class="m-0">vos produits en ligne</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-block m-0 align-self-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/steps-arrow.png') }}" class="card-img-top h-100" alt="Illustration des 'économies'">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card h-100 d-flex flex-column justify-content-center align-items-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_2.png') }}" class="card-img-top" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Choisissez</h5>
|
||||
<p class="m-0">votre créneau horaire</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-block m-0 align-self-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/steps-arrow.png') }}" class="card-img-top h-100"
|
||||
alt="Illustration de 'fraicheur et qualité'">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card h-100 d-flex flex-column justify-content-center align-items-center">
|
||||
<img src="{{ asset(config('app.theme') . '/img/icons/step_3.png') }}" class="card-img-top" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body m-2">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Retirez</h5>
|
||||
<p class="m-0">votre commande</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_2.png") }}" class="card-img-top w-lg-100" alt="Illustration des 'économies'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Des économies</h5>
|
||||
<p class="m-0">Profitez encore plus de nos produits gourmands en achetant en direct</p>
|
||||
|
||||
<!-- SERVICES -->
|
||||
<div id="avantages" class="row row-cols-1 row-cols-md-4">
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_1.png") }}" class="card-img-top w-lg-100" alt="Illustration d'un 'large choix'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Un large choix</h5>
|
||||
<p class="m-0">Des produits de qualité, des préparations variées, des quantités adaptées...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_2.png") }}" class="card-img-top w-lg-100" alt="Illustration des 'économies'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Des économies</h5>
|
||||
<p class="m-0">Profitez encore plus de nos produits gourmands en achetant en direct</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_3.png") }}" class="card-img-top w-lg-100" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Pratique et rapide</h5>
|
||||
<p class="m-0">Quoi de mieux que la commande en ligne pour gagner du temps ?</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_4.png") }}" class="card-img-top w-lg-100" alt="Illustration de 'fraicheur et qualité'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Fraicheur & Qualité</h5>
|
||||
<p class="m-0">Votre commande est préparée avec soin, dans le plus grand respect de la chaîne du froid</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_3.png") }}" class="card-img-top w-lg-100" alt="Illustration de 'pratique et rapide'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Pratique et rapide</h5>
|
||||
<p class="m-0">Quoi de mieux que la commande en ligne pour gagner du temps ?</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<div class="card d-flex flex-row flex-lg-column justify-content-center justify-content-lg-start align-items-center h-100">
|
||||
<img src="{{ asset(config('app.theme') . "/img/eng_4.png") }}" class="card-img-top w-lg-100" alt="Illustration de 'fraicheur et qualité'">
|
||||
<div class="card-body w-lg-100 m-1">
|
||||
<h5 class="m-0 font-Barlow-extra-bold">Fraicheur & Qualité</h5>
|
||||
<p class="m-0">Votre commande est préparée avec soin, dans le plus grand respect de la chaîne du froid</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
</article>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>
|
||||
<g fill="#fff"
|
||||
transform="rotate(180 12 12)
|
||||
translate(0 -2)">
|
||||
<path id="chevron" d='M5 17.4c.5.5 1.2.5 1.7 0l5.9-5.8 5.8 5.8c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-6.6-6.6c-.2-.2-.5-.3-.8-.3-.3 0-.6.1-.8.3l-6.6 6.6c-.7.5-.7 1.3-.3 1.7z'/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 348 B |
|
|
@ -1,7 +1,11 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>
|
||||
<g fill="#fff"
|
||||
transform="rotate(90 12 12)
|
||||
translate(0 -2)">
|
||||
<path id="chevron" d='M5 17.4c.5.5 1.2.5 1.7 0l5.9-5.8 5.8 5.8c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-6.6-6.6c-.2-.2-.5-.3-.8-.3-.3 0-.6.1-.8.3l-6.6 6.6c-.7.5-.7 1.3-.3 1.7z'/>
|
||||
</g>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#81C56F;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<circle class="st0" cx="12" cy="12" r="11.9"/>
|
||||
<polygon class="st1" points="9.6,17.9 17.3,12 9.6,6.1 "/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 533 B |
|
|
@ -1,7 +1,11 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>
|
||||
<g fill="#fff"
|
||||
transform="rotate(-90 12 12)
|
||||
translate(-1 -2)">
|
||||
<path id="chevron" d='M5 17.4c.5.5 1.2.5 1.7 0l5.9-5.8 5.8 5.8c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-6.6-6.6c-.2-.2-.5-.3-.8-.3-.3 0-.6.1-.8.3l-6.6 6.6c-.7.5-.7 1.3-.3 1.7z'/>
|
||||
</g>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#81C56F;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<circle class="st0" cx="12" cy="12" r="11.9"/>
|
||||
<polygon class="st1" points="14.5,6.1 6.8,12 14.5,17.9 "/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 534 B |
|
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>
|
||||
<g fill="#fff"
|
||||
transform="translate(0 -2)">
|
||||
<path id="chevron" d='M5 17.4c.5.5 1.2.5 1.7 0l5.9-5.8 5.8 5.8c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-6.6-6.6c-.2-.2-.5-.3-.8-.3-.3 0-.6.1-.8.3l-6.6 6.6c-.7.5-.7 1.3-.3 1.7z'/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 400 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 1,015 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 1,017 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 1,017 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 40 KiB |
13
resources/views/front/sable/img/pointer.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FF8500;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
||||
.st1{fill:#FFC200;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
||||
.st2{fill:#FFFFFF;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<ellipse class="st0" cx="12" cy="22.7" rx="5.3" ry="1.1"/>
|
||||
<path class="st1" d="M20.7,9c0,6.7-5,12.5-8.7,13.9C8.2,21.4,3.3,15.7,3.3,9c0-4.8,3.9-8.7,8.7-8.7S20.7,4.2,20.7,9z"/>
|
||||
<circle class="st2" cx="12" cy="9" r="6.7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 348 B |
2
resources/views/front/sable/js/app.js
vendored
|
|
@ -7,7 +7,7 @@ import { LdcwebCn } from "./vendor/ldcweb-cookies.js";
|
|||
import './utilities/bootstrap';
|
||||
import './utilities/swiper';
|
||||
import './utilities/simplebar';
|
||||
import './fo/cart';
|
||||
import './fo/common';
|
||||
|
||||
// Ldcweb cookies
|
||||
window.LdcwebCn = LdcwebCn;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="btn-basket">
|
||||
<div class="btn-basket position-relative">
|
||||
<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>
|
||||
|
|
@ -72,6 +72,13 @@
|
|||
foundQtty = element.cartItem.qty;
|
||||
}
|
||||
});
|
||||
if(this.$el.closest('.card')) {
|
||||
if(foundQtty) {
|
||||
this.$el.closest('.card').classList.add("card-activate");
|
||||
} else {
|
||||
this.$el.closest('.card').classList.remove("card-activate");
|
||||
}
|
||||
}
|
||||
return foundQtty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div id="basket" class="basket-hidden w-100 h-100 position-fixed top-0">
|
||||
<section id="basket" class="basket-hidden w-100 h-100 position-fixed top-0">
|
||||
<div class="basket-bg bkg-white position-absolute top-0 left-0 w-100 h-100"></div>
|
||||
<div class="container d-flex flex-row-reverse h-100 p-0 m-0 m-sm-auto">
|
||||
<div class="basket-preview p-3 rounded-4">
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
</ul>
|
||||
<section data-simplebar class="list-group">
|
||||
<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-center p-3" v-for="item in panier" :key="item.cartItem.id">
|
||||
<li class="list-group-item border-0 px-0 d-flex flex-row justify-content-between align-items-center p-2" v-for="item in panier" :key="item.cartItem.id">
|
||||
<img :src="'/images/produits/'+item.product.picture"
|
||||
:alt="item.cartItem.name"
|
||||
:title="item.cartItem.name"
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
target="_self">
|
||||
{{ item.cartItem.name }}
|
||||
</a>
|
||||
<p v-if="item.product.weight_variable" class="fst-italic fs-7 text-muted m-0">*Produit vendu au kilo</p>
|
||||
<p class="m-0">{{ item.product.sell_unit }}</p>
|
||||
</div>
|
||||
<div class="d-flex flex-column justify-content-start align-items-center">
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
</section>
|
||||
<div class="title-small d-flex flex-row justify-content-between align-items-center font-Barlow-bold px-2 px-md-4">
|
||||
<p v-show="!emptybasket">Total</p>
|
||||
<p v-show="!emptybasket">{{currencyFormatter(cartTotals.totalTTC)}}</p>
|
||||
<p v-show="!emptybasket">{{ currencyFormatter(cartTotals.totalTTC) }}</p>
|
||||
</div>
|
||||
<div class="d-flex flex-row-reverse justify-content-between align-items-center px-2 px-md-4">
|
||||
<a class="btn btn-product text-uppercase font-Barlow-bold rounded-4" v-show="!emptybasket" href="/commande/recap">Commander</a>
|
||||
|
|
@ -67,10 +68,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
|
|
@ -106,14 +106,13 @@
|
|||
let breaker = false;
|
||||
this.panier.forEach(element => {
|
||||
if(element.cartItem.id == product_id) {
|
||||
element.cartItem.qty += qtty;
|
||||
}
|
||||
if(element.cartItem.qty == 0) {
|
||||
element.cartItem.qty += qtty;
|
||||
}
|
||||
if(element.cartItem.qty <= 0) {
|
||||
this.removeItem(element.cartItem.rowId);
|
||||
breaker = true;
|
||||
}
|
||||
});
|
||||
|
||||
if(!breaker) {
|
||||
axios.post('/ajax/add-to-cart', {
|
||||
id: product_id,
|
||||
|
|
@ -121,8 +120,7 @@
|
|||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
this.updateStore(response.data);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
|
|
@ -132,31 +130,13 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
async multiaddtocart(arItems) {
|
||||
const data = await axios.post('/ajax/multi-add-to-cart', {
|
||||
items: arItems,
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
this.response = "Erreur lors de la modification du panier.";
|
||||
this.processing = false;
|
||||
});
|
||||
return data;
|
||||
},
|
||||
removeItem(rowId) {
|
||||
axios.post('/ajax/remove-from-cart', {
|
||||
rowId: rowId,
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
this.updateStore(response.data);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
|
|
@ -172,8 +152,7 @@
|
|||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
let result = response.data;
|
||||
this.updateStore(result);
|
||||
this.updateStore(response.data);
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
|
|
|
|||
|
|
@ -5,21 +5,21 @@
|
|||
<span class="number d-block d-flex flex-row justify-content-center align-items-center bkg-dark text-white rounded-4 mx-2 me-4">{{ countFilter }}</span>
|
||||
<img class="basket-icon" src="/sable/img/icons/filter.png" alt="Basket icon">
|
||||
</button>
|
||||
<div class="filters filters-hidden position-fixed position-lg-relative w-100 w-lg-25 h-100 h-lg-25 px-0 pt-3 pb-6">
|
||||
<div class="filters filters-hidden position-fixed position-lg-relative col-12 col-lg-3 h-100 h-lg-auto px-0 pt-3 pb-6 p-lg-0">
|
||||
<div class="filters-list h-100">
|
||||
<p class="filters-title d-flex justify-content-between justify-content-lg-start align-items-center position-relative title-small font-Barlow-bold m-0 m-lg-3">
|
||||
<span class="btn d-lg-none bkg-orange text-white rounded-4 ms-3">Effacer</span>
|
||||
<span class="btn d-lg-none bkg-orange text-white rounded-4 ms-3 reset">Effacer</span>
|
||||
<span>Filtres</span>
|
||||
<button class="btn d-lg-none icon-medium icon-cross me-2"></button>
|
||||
<button class="btn d-lg-none icon-medium icon-cross me-2 close"></button>
|
||||
</p>
|
||||
<!-- Search bar -->
|
||||
<div class="m-3">
|
||||
<form class="d-block d-lg-none" method="GET" action="">
|
||||
<input class="form-control w-100 rounded-4 border-dark" :disabled="loading" type="text" id="filter" name="filter" value="" placeholder="Rechercher...">
|
||||
</form>
|
||||
<!--<form class="d-block d-lg-none" method="GET" action="">-->
|
||||
<input v-on:change="updatedFilter()" class="form-control w-100 rounded-4 border-dark" :disabled="loading" type="text" id="search" name="search" v-model="search" placeholder="Rechercher...">
|
||||
<!--</form>-->
|
||||
</div>
|
||||
<!-- Filter Promotions -->
|
||||
<div class="m-3">
|
||||
<!-- <div class="m-3">
|
||||
<button
|
||||
class="btn filters-btn d-flex justify-content-between align-items-center rounded-0 w-100 border-0 p-0 pb-lg-2"
|
||||
type="button" data-bs-toggle="collapse" data-bs-target="#filterCollapsePromotions"
|
||||
|
|
@ -30,15 +30,14 @@
|
|||
</svg>
|
||||
</button>
|
||||
<div class="collapse show" id="filterCollapsePromotions">
|
||||
<!-- Promotions -->
|
||||
<div class="form-check d-flex flex-row flex-lg-row-reverse justify-content-between align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input v-on:click="fetchProducts" v-model="hasPromotion" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button" id="filterPromotions">
|
||||
<input v-on:click="updatedFilter()" v-model="hasPromotion" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button" id="filterPromotions">
|
||||
<label class="form-check-label w-100 ps-3 pe-0 ps-lg-0 pe-lg-3" role="button" for="filterPromotions">
|
||||
Promotions
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Filter Ranges -->
|
||||
<div class="m-3">
|
||||
<button
|
||||
|
|
@ -46,15 +45,13 @@
|
|||
type="button" data-bs-toggle="collapse" data-bs-target="#filterCollapseRanges"
|
||||
aria-expanded="true" aria-controls="filterCollapseRanges">
|
||||
<span class="title-small font-Barlow-bold">Rayons</span>
|
||||
<svg id="arrow-down" class="svg" viewBox='0 0 16 16'>
|
||||
<path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
|
||||
</svg>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
<div class="collapse show" id="filterCollapseRanges">
|
||||
<!-- Ranges -->
|
||||
<div v-for="(range, rangeIndex) in ranges" :key="rangeIndex"
|
||||
class="form-check d-flex flex-row flex-lg-row-reverse justify-content-between align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input v-on:click="fetchProducts" v-model="range.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
<input v-on:click="updatedFilter()" v-model="range.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
:id="`filterRanges${rangeIndex}`">
|
||||
<label class="form-check-label w-100 ps-3 pe-0 ps-lg-0 pe-lg-3" role="button"
|
||||
:for="`filterRanges${rangeIndex}`">
|
||||
|
|
@ -70,15 +67,13 @@
|
|||
type="button" data-bs-toggle="collapse" data-bs-target="#filterCollapseBrand"
|
||||
aria-expanded="true" aria-controls="filterCollapseBrand">
|
||||
<span class="title-small font-Barlow-bold">Marques</span>
|
||||
<svg id="arrow-down" class="svg" viewBox='0 0 16 16'>
|
||||
<path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
|
||||
</svg>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
<div class="collapse show" id="filterCollapseBrand">
|
||||
<!-- Brands -->
|
||||
<div v-for="(brand, brandIndex) in brands" :key="brandIndex"
|
||||
class="form-check d-flex flex-row flex-lg-row-reverse justify-content-between align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input v-on:click="fetchProducts" v-model="brand.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
<input v-on:click="updatedFilter()" v-model="brand.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
:id="`filterBrand${brandIndex}`">
|
||||
<label class="form-check-label w-100 ps-3 pe-0 ps-lg-0 pe-lg-3" role="button"
|
||||
:for="`filterBrand${brandIndex}`">
|
||||
|
|
@ -94,15 +89,13 @@
|
|||
type="button" data-bs-toggle="collapse" data-bs-target="#filterCollapseTag"
|
||||
aria-expanded="true" aria-controls="filterCollapseTag">
|
||||
<span class="title-small font-Barlow-bold">Spécial</span>
|
||||
<svg id="arrow-down" class="svg" viewBox='0 0 16 16'>
|
||||
<path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
|
||||
</svg>
|
||||
<i class="fas fa-chevron-down" aria-hidden="true"></i>
|
||||
</button>
|
||||
<div class="collapse show" id="filterCollapseTag">
|
||||
<!-- Tags -->
|
||||
<div v-for="(tag, tagIndex) in tags" :key="tagIndex"
|
||||
class="form-check d-flex flex-row flex-lg-row-reverse justify-content-between align-items-center rounded-2 px-3 py-2 p-lg-0 mt-2 mb-0">
|
||||
<input v-on:click="fetchProducts" v-model="tag.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
<input v-on:click="updatedFilter()" v-model="tag.selected" :disabled="loading" class="form-check-input m-0" type="checkbox" role="button"
|
||||
:id="`filterTag${tagIndex}`">
|
||||
<label class="form-check-label w-100 ps-3 pe-0 ps-lg-0 pe-lg-3" role="button"
|
||||
:for="`filterTag${tagIndex}`">
|
||||
|
|
@ -117,74 +110,69 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- container de produit -->
|
||||
<section class="w-100 w-lg-75 px-0 px-xl-2">
|
||||
<div class="products col-12 col-lg-9 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">
|
||||
<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="image">
|
||||
<content-placeholders>
|
||||
<content-placeholders-img />
|
||||
</content-placeholders>
|
||||
</div>
|
||||
<div class="text">
|
||||
<content-placeholders>
|
||||
<content-placeholders-text :lines="3" />
|
||||
</content-placeholders>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<div v-else class="row m-0 g-4">
|
||||
<div class="row m-0 g-4">
|
||||
<!-- card article -->
|
||||
<article v-for="(product, productIndex) in showedProducts"
|
||||
<article v-for="(product, productIndex) in products"
|
||||
:key="productIndex"
|
||||
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' : '']">
|
||||
v-bind:class="[product.availability ? 'card-available-soon' : '']">
|
||||
<div class="position-relative w-100 h-100 px-4">
|
||||
<div class="d-flex flex-row flex-lg-column justify-content-between align-items-center w-100 h-100 col-md-4 m-0x py-2 pb-lg-4">
|
||||
<div class="position-relative text-center w-25 w-lg-100 h-lg-50">
|
||||
<div class="position-relative text-center w-25 w-lg-100">
|
||||
<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="h-lg-100 mw-100" :src="'/images/produits/' + product.picture" :alt="'Image du produit '+product.name">
|
||||
<img v-if="product.picture" class="mw-100" :src="'/images/produits/' + product.picture" :alt="'Image du produit '+product.name">
|
||||
<img v-else class="mw-100" src="/sable/img/pl_nophoto.png" alt="Image d'un produit par défaut">
|
||||
</div>
|
||||
<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 ps-2 px-lg-0">
|
||||
<h5 class="font-Barlow-bold m-0 m-lg-2 mb-lg-0">
|
||||
<h5 class="font-Barlow-bold text-center m-0 m-lg-2 mb-lg-0">
|
||||
<a class="text-decoration-none text-dark stretched-link" :href="'/produit/'+product.slug">{{ product.name }}</a>
|
||||
</h5>
|
||||
<div class="card-text w-100" v-html="product.description"></div>
|
||||
<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 h5" v-bind:class="{'text-red': product.promotion}">{{ currencyFormatter(product.discountedPriceTtc) }}</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 class="card-text text-start text-lg-center w-100" v-html="product.description"></div>
|
||||
<div class="card-price d-flex flex-row justify-content-center align-items-center my-2">
|
||||
<span v-if="product.weight_variable" class="me-1">Environ*</span>
|
||||
<span class="card-price-new font-Barlow-bold h5">{{ currencyFormatter(product.discountedPriceTtc) }}</span>
|
||||
<span v-if="product.weight_variable" class="text-lowercase ms-1">/{{ product.sell_unit }}</span>
|
||||
<!-- <span class="card-price-new h5" v-bind:class="{'text-red': product.promotion}">{{ currencyFormatter(product.discountedPriceTtc) }}</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>
|
||||
<p class="fst-italic text-muted mb-2" v-bind:class="[product.weight_variable ? '' : 'opacity-0']">*Produit vendu au kilo : {{ currencyFormatter(product.priceKgTtc) }} /kg</p>
|
||||
<div class="card-action d-flex flex-row-reverse justify-content-between align-items-center w-100">
|
||||
<basket-buttons :product-id="product.id"></basket-buttons>
|
||||
<img v-if="product.nutriscore != null" class="card-action-nutriscore" :src="'/sable/img/nutriscore/nutriscore-'+product.nutriscore+'.png'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!product.loading" class="filtre position-absolute bottom-0 start-0 w-100 h-100 h-lg-75 rounded-4"></div>
|
||||
<div class="filtre position-absolute bottom-0 start-0 w-100 h-100 h-lg-75 rounded-4"></div>
|
||||
</div>
|
||||
</article>
|
||||
<article v-if="loading" class="placeholder col-lg-4 card rounded-4 px-0 py-2 p-lg-1 p-xl-3 m-0">
|
||||
<div class="position-relative w-100 h-100 px-4">
|
||||
<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="image w-25 w-lg-100 h-lg-50">
|
||||
<content-placeholders>
|
||||
<content-placeholders-img />
|
||||
</content-placeholders>
|
||||
</div>
|
||||
<div class="text w-75 w-lg-100 h-lg-50 ps-2 px-lg-0">
|
||||
<content-placeholders>
|
||||
<content-placeholders-text :lines="5" />
|
||||
</content-placeholders>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<div class="d-flex flex-column m-0">
|
||||
<button class="btn btn-more-products my-3" v-bind:class="[this.productsResults > this.products.length ? 'd-none' : (currentPage > 1) ? 'd-none' : '']" v-on:click="checkScroll()">
|
||||
<i class="fas fa-circle-plus" aria-hidden="true"></i>
|
||||
</button>
|
||||
<p class="fst-italic text-center text-muted" v-bind:class="[(this.productsResults * this.currentPage) <= this.products.length ? 'd-none' : '']" v-on:click="checkScroll()">Tous les produits correspondants à votre recherche sont affichés</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paginator my-4" v-if="lastPage > 1 && !loading">
|
||||
<nav>
|
||||
<ul class="pagination justify-content-end font-Barlow-bold m-0">
|
||||
<li class="page-item" v-if="currentPage > firstPage" v-on:click="showPrevPage(true, $event);">
|
||||
<a href="#" rel="prev" aria-label="« Précédent" class="page-link">‹</a>
|
||||
</li>
|
||||
<li v-for="pageNumber in pagesNumber" :key="pageNumber" class="page-item" v-on:click="loadPage(pageNumber)">
|
||||
<a href="#" :class="'page-link ' + (pageNumber==currentPage ? 'active' : '')" >{{ pageNumber }}</a>
|
||||
</li>
|
||||
<li class="page-item" v-if="currentPage < lastPage" v-on:click="showNextPage(true, $event);">
|
||||
<a href="#" rel="next" aria-label="Suivant »" class="page-link">›</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -202,22 +190,21 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
loading: false,
|
||||
countFilter: 0,
|
||||
hasPromotion: false,
|
||||
ranges: [],
|
||||
brands: [],
|
||||
tags: [],
|
||||
search: "",
|
||||
products: [],
|
||||
showedProducts: {},
|
||||
maxPagesToShow: 2,
|
||||
paginate: 9,
|
||||
firstPage: 1,
|
||||
lastPage: 2,
|
||||
productsResults: 0,
|
||||
url: "",
|
||||
currentPage: 1,
|
||||
pagesNumber: [],
|
||||
btnFilter: undefined,
|
||||
btnFilterCross: undefined
|
||||
btnFilterCross: undefined,
|
||||
btnSearch: undefined,
|
||||
filters: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -226,94 +213,103 @@
|
|||
this.ranges = jsonData.ranges ?? [];
|
||||
this.brands = jsonData.brands ?? [];
|
||||
this.tags = jsonData.tags ?? [];
|
||||
this.search = jsonData.search ?? "";
|
||||
this.products = jsonData.products ?? [];
|
||||
this.fetchProducts();
|
||||
this.productsResults = jsonData.productsResults ?? 0;
|
||||
this.filters = jsonData.filters ?? [];
|
||||
this.selectFilters();
|
||||
this.responsiveFilters();
|
||||
this.countResults();
|
||||
},
|
||||
methods: {
|
||||
genPagesNumbers() {
|
||||
// Reset pagesNumber.
|
||||
let pagesNumber = []
|
||||
let wantedFirst = this.currentPage - this.maxPagesToShow
|
||||
let wantedLast = this.currentPage + this.maxPagesToShow
|
||||
let start = this.firstPage >= wantedFirst ? this.firstPage : wantedFirst
|
||||
let stop = this.lastPage <= wantedLast ? this.lastPage : wantedLast
|
||||
do {
|
||||
// Set pages array.
|
||||
pagesNumber.push(start++)
|
||||
} while(start <= stop)
|
||||
this.$set(this, 'pagesNumber', pagesNumber)
|
||||
},
|
||||
showPrevPage() {
|
||||
let wantedPage = this.currentPage - 1
|
||||
this.currentPage = wantedPage >=this.firstPage ? wantedPage : this.firstPage
|
||||
this.loadPage(this.currentPage)
|
||||
},
|
||||
showNextPage() {
|
||||
let wantedPage = this.currentPage + 1
|
||||
this.currentPage = wantedPage <= this.lastPage ? wantedPage : this.lastPage
|
||||
this.loadPage(this.currentPage)
|
||||
},
|
||||
loadPage(page) {
|
||||
// Reset showed products.
|
||||
this.$set(this, 'showedProducts', {})
|
||||
this.$set(this, 'currentPage', page)
|
||||
let perPage = this.paginate
|
||||
let start = perPage * page - perPage + 1
|
||||
let stop = perPage * page
|
||||
|
||||
let k = 1
|
||||
for (let id in this.products) {
|
||||
if(k < start) {
|
||||
k++
|
||||
continue
|
||||
/**
|
||||
* Add an event on scroll to set the nextest page.
|
||||
*/
|
||||
checkScroll() {
|
||||
this.nextPage();
|
||||
window.addEventListener("scroll", () => {
|
||||
if (
|
||||
window.innerHeight + window.scrollY >=
|
||||
document.body.offsetHeight - 50 &&
|
||||
!this.loading &&
|
||||
(this.productsResults * this.currentPage) <= this.products.length
|
||||
) {
|
||||
this.nextPage();
|
||||
}
|
||||
if(k > stop) {
|
||||
break
|
||||
}
|
||||
let product = Object.assign({}, this.products[id])
|
||||
product.availability = this.getAvailability(product)
|
||||
this.$set(this.showedProducts, k++, product)
|
||||
}
|
||||
|
||||
this.lastPage = Math.ceil(Object.keys(this.products).length / this.paginate)
|
||||
this.genPagesNumbers()
|
||||
this.responsiveFilters()
|
||||
this.countResults()
|
||||
});
|
||||
},
|
||||
fetchProducts() {
|
||||
/**
|
||||
* Set the current page to the next.
|
||||
* Update the url.
|
||||
* Update the products.
|
||||
*/
|
||||
nextPage() {
|
||||
this.currentPage++;
|
||||
this.updateUrl();
|
||||
this.updateProducts();
|
||||
},
|
||||
/**
|
||||
* Reset the pagination.
|
||||
* Update the url.
|
||||
* Load the new products.
|
||||
*/
|
||||
updatedFilter() {
|
||||
setTimeout(() => {
|
||||
const filters = this.getFilters();
|
||||
this.countFilter = 0;
|
||||
let url = '/produits/filter?' ;
|
||||
url += `promotion=${filters.promotion ? '1' : '0'}`;
|
||||
filters.promotion ? this.countFilter++ : '';
|
||||
filters.brands.map((value) => {
|
||||
url += `&brands[]=${value}`;
|
||||
this.countFilter++;
|
||||
})
|
||||
filters.tags.map((id) => {
|
||||
url += `&tags[]=${id}`;
|
||||
this.countFilter++;
|
||||
})
|
||||
filters.ranges.map((id) => {
|
||||
url += `&ranges[]=${id}`;
|
||||
this.countFilter++;
|
||||
})
|
||||
window.axios.get(url)
|
||||
.then(response => {
|
||||
this.products = response.data;
|
||||
this.currentPage = 1;
|
||||
this.loadPage(this.currentPage);
|
||||
this.loading = false
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
alert('Erreur 101');
|
||||
this.processing = false;
|
||||
});
|
||||
}, 10)
|
||||
this.resetPagination();
|
||||
this.updateUrl();
|
||||
this.updateProducts();
|
||||
}, 50)
|
||||
},
|
||||
// Get all selected value on inputs.
|
||||
/**
|
||||
* Set the current page to the first.
|
||||
* Set the products array to empty.
|
||||
*/
|
||||
resetPagination() {
|
||||
this.currentPage = 1;
|
||||
this.products = [];
|
||||
},
|
||||
/**
|
||||
* Load the current page.
|
||||
*/
|
||||
updateProducts() {
|
||||
this.loading = true,
|
||||
window.axios.get(this.url)
|
||||
.then(response => {
|
||||
this.products = this.products.concat(response.data);
|
||||
this.loading = false;
|
||||
this.countResults();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Construct the url with the selected filters.
|
||||
*/
|
||||
updateUrl() {
|
||||
const filters = this.getFilters();
|
||||
this.countFilter = 0;
|
||||
this.url = '/produits/filter?' ;
|
||||
this.url += `promotion=${filters.promotion ? '1' : '0'}`;
|
||||
this.url += (this.search) ? `&search=`+this.search : '';
|
||||
filters.promotion ? this.countFilter++ : '';
|
||||
filters.brands.map((value) => {
|
||||
this.url += `&brands[]=${value}`;
|
||||
this.countFilter++;
|
||||
});
|
||||
filters.tags.map((id) => {
|
||||
this.url += `&tags[]=${id}`;
|
||||
this.countFilter++;
|
||||
});
|
||||
filters.ranges.map((id) => {
|
||||
this.url += `&ranges[]=${id}`;
|
||||
this.countFilter++;
|
||||
});
|
||||
this.url += ('&page=' + this.currentPage);
|
||||
},
|
||||
/**
|
||||
* Return an array with the selected filters.
|
||||
*/
|
||||
getFilters() {
|
||||
return {
|
||||
promotion: this.hasPromotion,
|
||||
|
|
@ -326,43 +322,93 @@
|
|||
.map((tag) => tag.id),
|
||||
};
|
||||
},
|
||||
// Return the availability of a product.
|
||||
/**
|
||||
* Return the availability of a product.
|
||||
*/
|
||||
getAvailability(product) {
|
||||
if(product.orderable_start != null && product.orderable_end != null){
|
||||
let dateNow = new Date()
|
||||
let dateStart = new Date(product.orderable_start)
|
||||
let dateEnd = new Date(product.orderable_end)
|
||||
let dateNow = new Date();
|
||||
let dateStart = new Date(product.orderable_start);
|
||||
let dateEnd = new Date(product.orderable_end);
|
||||
if(dateNow > dateStart && dateNow < dateEnd) {
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Update filters total number.
|
||||
*/
|
||||
countResults() {
|
||||
this.btnResults.textContent = "Voir les " + Object.keys(this.products).length + " produits";
|
||||
this.btnResults.textContent = "Voir les " + this.products.length + " produits";
|
||||
},
|
||||
// Event that show filters on mobile.
|
||||
/**
|
||||
* Check proper boxes on start
|
||||
*/
|
||||
selectFilters() {
|
||||
if (this.filters.ranges)
|
||||
this.filters.ranges.map((selectrangeid) => this.ranges
|
||||
.filter((range)=>range.id == selectrangeid)
|
||||
.map((range)=> range.selected = true));
|
||||
if (this.filters.brands)
|
||||
this.filters.brands.map((selectbrandvalue) => this.brands
|
||||
.filter((brand)=> {return brand.value == selectbrandvalue;})
|
||||
.map((brand)=> brand.selected = true));
|
||||
if (this.filters.tags)
|
||||
this.filters.tags.map((selecttagid) => this.tags.filter((tag)=>tag.id == selecttagid).map((tag)=> tag.selected = true));
|
||||
},
|
||||
/**
|
||||
* Event on mobile version.
|
||||
*/
|
||||
responsiveFilters(){
|
||||
this.btnFilter = document.querySelector(".filter-btn")
|
||||
this.btnFilterCross = document.querySelector(".filters-title button")
|
||||
this.btnSearch = document.querySelector(".btn-search-icon")
|
||||
this.btnFilterCross = document.querySelector(".filters-title button.close")
|
||||
this.btnFilterReset = document.querySelector(".filters-title .btn.reset")
|
||||
this.btnResults = document.querySelector(".btn-results")
|
||||
if (this.btnFilter)
|
||||
this.btnFilter.addEventListener("click", this.responsiveFiltersDisplay)
|
||||
if (this.btnSearch)
|
||||
this.btnSearch.addEventListener("click", this.responsiveFiltersDisplay)
|
||||
if (this.btnFilterCross)
|
||||
this.btnFilterCross.addEventListener("click", this.responsiveFiltersDisplay)
|
||||
if (this.btnFilterReset)
|
||||
this.btnFilterReset.addEventListener("click", this.responsiveFiltersReset)
|
||||
if (this.btnResults)
|
||||
this.btnResults.addEventListener("click", this.responsiveFiltersDisplay)
|
||||
},
|
||||
|
||||
/**
|
||||
* Reset filters
|
||||
*/
|
||||
|
||||
responsiveFiltersReset() {
|
||||
this.ranges.filter((range) => range.selected)
|
||||
.map((range) => range.selected = false);
|
||||
this.brands.filter((brand) => brand.selected)
|
||||
.map((brand) => brand.selected = false);
|
||||
this.tags.filter((tag) => tag.selected)
|
||||
.map((tag) => tag.selected = false);
|
||||
this.hasPromotion = false;
|
||||
this.search = "";
|
||||
this.updatedFilter();
|
||||
},
|
||||
|
||||
/**
|
||||
* Show/hide filters on mobile version.
|
||||
*/
|
||||
responsiveFiltersDisplay() {
|
||||
document.querySelector(".filters").classList.toggle("filters-hidden");
|
||||
document.querySelector("body").classList.toggle("overflow-hidden");
|
||||
},
|
||||
// General purpose.
|
||||
/**
|
||||
* General purpose.
|
||||
*/
|
||||
currencyFormatter(num) {
|
||||
if (isNaN(num)) {
|
||||
return num;
|
||||
|
|
@ -372,30 +418,3 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.placeholder {
|
||||
& .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
& .text {
|
||||
width: 75%;
|
||||
height: 50%;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.placeholder {
|
||||
& .image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
& .text {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,19 +6,19 @@
|
|||
Votre point de retrait
|
||||
</h3>
|
||||
<div class="row row-cols-1 row-cols-md-2 g-4">
|
||||
<div class="col m-0">
|
||||
<div class="col m-0" @click="choosemagasin(magasin.id)">
|
||||
<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 class="col-4 p-3">
|
||||
<img src="/sable/img/pointer.svg" 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 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>
|
||||
|
|
@ -26,13 +26,21 @@
|
|||
<input type="hidden" :value="selectedmagasin" name="selectedmagasin" />
|
||||
</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
|
||||
<span class="text-green">2.</span>
|
||||
Choisissez le jour du retrait de votre commande
|
||||
</h3>
|
||||
<div class="datetime-collect">
|
||||
<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>
|
||||
<h2>
|
||||
<span @click="prevMonth()" v-show="canPrevMonth()">
|
||||
<img src="/sable/img/chevron_prev.svg">
|
||||
</span>
|
||||
{{ months[currentmonth] }} {{ currentyear }}
|
||||
<span @click="nextMonth()">
|
||||
<img src="/sable/img/chevron_next.svg">
|
||||
</span>
|
||||
</h2>
|
||||
<header>
|
||||
<div v-for="day in days" :key="day">{{ short(day) }}</div>
|
||||
</header>
|
||||
|
|
@ -46,17 +54,17 @@
|
|||
<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
|
||||
<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="card m-0 mb-lg-3" :class="styleCren(creneau)" role="button">
|
||||
<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 class="card-body">
|
||||
<h5 class="card-title title-small font-Barlow-medium">{{ creneau.horaire }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -108,25 +116,6 @@ export default {
|
|||
type: Number,
|
||||
default : 34 //soit 5 semaines
|
||||
},
|
||||
// defaultCreneaux: {
|
||||
// type: Array,
|
||||
// default: function() {
|
||||
// var x = 15; //minutes interval
|
||||
// var times = []; // time array
|
||||
// var tt = 0; // start time
|
||||
// var ap = ['AM', 'PM']; // AM-PM
|
||||
|
||||
// //loop to increment the time and push results in array
|
||||
// for (var i=0;tt<24*60; i++) {
|
||||
// var hh = Math.floor(tt/60); // getting hours of day in 0-24 format
|
||||
// var mm = (tt%60); // getting minutes of the hour in 0-55 format
|
||||
// times[i] = ("0" + hh).slice(-2) + ':' + ("0" + mm).slice(-2) //+ ap[Math.floor(hh/12)]; // pushing data in array in [00:00 - 12:00 AM/PM format]
|
||||
// tt = tt + x;
|
||||
// }
|
||||
|
||||
// return times;
|
||||
// }
|
||||
// },
|
||||
dbavailablecreneaux: {
|
||||
type: String,
|
||||
},
|
||||
|
|
@ -139,9 +128,9 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
date() { return new Date(this.currentyear, this.currentmonth, 1);},
|
||||
startday() {return this.date.getDay() < 1 ? 6 : this.date.getDay() - 1;},
|
||||
dayscount() {return new Date(this.currentyear, this.currentmonth + 1, 0).getDate();},
|
||||
date() { return new Date(this.currentyear, this.currentmonth, 1); },
|
||||
startday() { return this.date.getDay() < 1 ? 6 : this.date.getDay() - 1; },
|
||||
dayscount() { return new Date(this.currentyear, this.currentmonth + 1, 0).getDate(); },
|
||||
tiles() { return this.prepare(); },
|
||||
creneaux: {
|
||||
get: function(){ return this.listCreneaux(); },
|
||||
|
|
@ -151,21 +140,20 @@ export default {
|
|||
return {
|
||||
currentmonth: null,
|
||||
currentyear: this.year,
|
||||
selectedDay : new Date().toLocaleDateString(),
|
||||
selectedDay: new Date().toLocaleDateString(),
|
||||
selectedCreneau : null,
|
||||
current: new Date(),
|
||||
availableCreneaux: [],
|
||||
scrollCounter: 0,
|
||||
interval:false,
|
||||
interval: false,
|
||||
magasin: {},
|
||||
selectedmagasin: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.availableCreneaux = JSON.parse(this.dbavailablecreneaux);
|
||||
//this.availableCrenaux = this.dbavailablecreneaux;
|
||||
this.selectedDay = this.current.toLocaleDateString();
|
||||
this.currentmonth = this.month; //this.months.indexOf(this.month);
|
||||
this.currentmonth = this.month;
|
||||
this.magasin = JSON.parse(this.dbmagasin);
|
||||
this.loadAvailableCreneaux();
|
||||
this.choosemagasin(this.magasin.id);
|
||||
|
|
@ -176,7 +164,7 @@ export default {
|
|||
this.currentmonth = 0;
|
||||
this.currentyear += 1;
|
||||
} else {
|
||||
this.currentmonth+=1;
|
||||
this.currentmonth += 1;
|
||||
}
|
||||
},
|
||||
prevMonth() {
|
||||
|
|
@ -202,7 +190,7 @@ export default {
|
|||
'last': tile.last,
|
||||
'next': tile.next,
|
||||
'current': tile.current,
|
||||
'selected' : tile.selected,
|
||||
'selected': tile.selected,
|
||||
'grey': tile.grey,
|
||||
'unavailable': tile.unavailable
|
||||
}
|
||||
|
|
@ -234,7 +222,7 @@ export default {
|
|||
//this tile's date
|
||||
date: date,
|
||||
//not available
|
||||
unavailable: (new Date(this.current.getFullYear(), this.current.getMonth(), this.current.getDate()) > date) ? true : false,
|
||||
unavailable: ((new Date(this.current.getFullYear(), this.current.getMonth(), this.current.getDate()) > date) || this.checkNoCren(date)) ? true : false,
|
||||
};
|
||||
if (i < this.startday)
|
||||
before.push(obj);
|
||||
|
|
@ -245,6 +233,12 @@ export default {
|
|||
}
|
||||
return before.reverse().concat(current);
|
||||
},
|
||||
checkNoCren(date) {
|
||||
if(this.availableCreneaux[date.toLocaleDateString()]) {
|
||||
return this.availableCreneaux[date.toLocaleDateString()].length ? false : true;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
showCreneaux(tile){
|
||||
if(!tile.unavailable) {
|
||||
this.selectedDay = tile.date.toLocaleDateString();
|
||||
|
|
@ -255,8 +249,8 @@ export default {
|
|||
this.prevMonth();
|
||||
}
|
||||
}
|
||||
//this.selectedCreneau = null;
|
||||
//this.creneaux = this.listCreneaux();
|
||||
this.selectedCreneau = null;
|
||||
this.creneaux = this.listCreneaux();
|
||||
},
|
||||
selectSlot(creneau){
|
||||
if(creneau.dispo) {
|
||||
|
|
@ -264,28 +258,27 @@ export default {
|
|||
}
|
||||
},
|
||||
listCreneaux() {
|
||||
let todaysAvailable = [];
|
||||
if(this.selectedDay in this.availableCreneaux) {
|
||||
todaysAvailable = this.availableCreneaux["" + this.selectedDay];
|
||||
}
|
||||
let crens = [];
|
||||
todaysAvailable.forEach(element => {
|
||||
let obj = {
|
||||
//day: index,
|
||||
horaire: element[0],
|
||||
dispo: element[1],
|
||||
selected: (this.selectedCreneau == this.selectedDay + "-" + element[0]) ? true : false
|
||||
};
|
||||
//option pour ne générer que les créneaux disponibles
|
||||
if(this.showOnlyAvailables) {
|
||||
if (obj.dispo) {
|
||||
crens.push(obj);
|
||||
}
|
||||
} else {
|
||||
let todaysAvailable = [];
|
||||
if(this.selectedDay in this.availableCreneaux) {
|
||||
todaysAvailable = this.availableCreneaux["" + this.selectedDay];
|
||||
}
|
||||
let crens = [];
|
||||
todaysAvailable.forEach(element => {
|
||||
let obj = {
|
||||
horaire: element[0],
|
||||
dispo: element[1],
|
||||
selected: (this.selectedCreneau == this.selectedDay + "-" + element[0]) ? true : false
|
||||
};
|
||||
//option pour ne générer que les créneaux disponibles
|
||||
if(this.showOnlyAvailables) {
|
||||
if (obj.dispo) {
|
||||
crens.push(obj);
|
||||
}
|
||||
});
|
||||
return crens;
|
||||
} else {
|
||||
crens.push(obj);
|
||||
}
|
||||
});
|
||||
return crens;
|
||||
},
|
||||
scrollStart(way) {
|
||||
this.interval = setInterval(() => {
|
||||
|
|
@ -341,7 +334,7 @@ export default {
|
|||
},
|
||||
loadAvailableCreneaux() {
|
||||
if(this.selectedmagasin != null) {
|
||||
document.querySelector(".datetime-collect").show();
|
||||
document.querySelector(".datetime-collect").display = "block";
|
||||
axios.post('/ajax/get-time-slots', {
|
||||
id: this.selectedmagasin,
|
||||
}).then(
|
||||
|
|
@ -356,7 +349,7 @@ export default {
|
|||
this.processing = false;
|
||||
});
|
||||
} else {
|
||||
document.querySelector(".datetime-collect").hide();
|
||||
document.querySelector(".datetime-collect").display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
38
resources/views/front/sable/js/fo/cart.js
vendored
|
|
@ -1,38 +0,0 @@
|
|||
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 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)
|
||||
basketCross.addEventListener("click", showBasket);
|
||||
|
||||
function showBasket() {
|
||||
basket.classList.toggle("basket-hidden");
|
||||
}
|
||||
});
|
||||
68
resources/views/front/sable/js/fo/common.js
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
window.showModalClearCart = function() {
|
||||
$('#empty-basket-modal > div.modal').show();
|
||||
}
|
||||
|
||||
window.closeModalClearCart = function() {
|
||||
$('#empty-basket-modal > div.modal').hide();
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
/* ----- SALES ----- */
|
||||
var btnCross = document.querySelectorAll("#command .btn-cross");
|
||||
if (btnCross.length > 0) {
|
||||
for (let i = 0 ; i < btnCross.length ; i ++) {
|
||||
btnCross[i].addEventListener("click", () => {
|
||||
console.log(btnCross[i].value)
|
||||
axios.post('/ajax/remove-from-cart', {
|
||||
rowId: btnCross[i].value,
|
||||
instance: 'panier',
|
||||
}).then(
|
||||
(response) => {
|
||||
location.reload()
|
||||
}
|
||||
)
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
this.response = "Erreur lors de la modification du panier.";
|
||||
this.processing = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* ----- BASKET ----- */
|
||||
var basket = document.getElementById("basket");
|
||||
var basketBtn = document.querySelector("#navbar .btn-navbar");
|
||||
var basketCross = document.querySelector("#basket .icon-cross");
|
||||
|
||||
if (basket)
|
||||
basket.addEventListener("click", (e) => {
|
||||
var basketPreview = document.querySelector(".basket-preview");
|
||||
var basketEmpty = document.querySelector(".basket-empty")
|
||||
if (basketEmpty.style.display == "none") {
|
||||
if (e.clientX < basketPreview.offsetLeft ||
|
||||
e.clientX > (basketPreview.offsetLeft + basketPreview.clientWidth) ||
|
||||
e.clientY > (basketPreview.offsetTop + basketPreview.clientHeight)) {
|
||||
showBasket();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (basketBtn)
|
||||
basketBtn.addEventListener("click", showBasket);
|
||||
if (basketCross)
|
||||
basketCross.addEventListener("click", showBasket);
|
||||
|
||||
function showBasket() {
|
||||
basket.classList.toggle("basket-hidden");
|
||||
}
|
||||
|
||||
/* ----- MENU ----- */
|
||||
var navCollapse = document.querySelector(".navbar-collapse");
|
||||
var navLink = navCollapse.querySelectorAll(".nav-link");
|
||||
navLink.forEach(element => {
|
||||
element.addEventListener("click", () => {
|
||||
navCollapse.classList.remove("show");
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
@ -14,15 +14,12 @@ $(document).ready(function(){
|
|||
enabled: true,
|
||||
onlyInViewport: false,
|
||||
},
|
||||
mousewheel: {
|
||||
invert: true,
|
||||
},
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
if (window.matchMedia("(min-width: 768px)").matches) {
|
||||
if (window.matchMedia("(min-width: 992px)").matches) {
|
||||
var itemsPerView = 3;
|
||||
} else {
|
||||
var itemsPerView = 1;
|
||||
|
|
@ -39,9 +36,6 @@ $(document).ready(function(){
|
|||
keyboard: {
|
||||
enabled: true,
|
||||
onlyInViewport: false,
|
||||
},
|
||||
mousewheel: {
|
||||
invert: true,
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<a class="nav-link font-Barlow-medium" href="{{ route('legal-notice') }}">Mentions légales & CGU</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a class="nav-link font-Barlow-medium" href="{{ route('privacy') }}">Politique de confidentialité</a>
|
||||
<a class="nav-link font-Barlow-medium" href="{{ route('privacy') }}">Charte de confidentialité</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a class="nav-link font-Barlow-medium" href="{{ route('faq') }}">FAQ</a>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,12 @@
|
|||
|
||||
@include('layouts.basket')
|
||||
|
||||
@include('breadcrumb.breadcrumb-body')
|
||||
@yield('content')
|
||||
@include('partials.home-slider')
|
||||
|
||||
<main class="container">
|
||||
@include('breadcrumb.breadcrumb-body')
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,40 +11,44 @@
|
|||
</a>
|
||||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link"
|
||||
href="@if (Route::is('home')) {{config('app.url') }}#promotions @else {{ route('products', ['promotion' => true]) }} @endif">
|
||||
Promotions
|
||||
<a class="nav-link @if (Route::is('home')) d-none @endif"
|
||||
href="{{ route('home') }}">
|
||||
Accueil
|
||||
</a>
|
||||
<a class="nav-link @if (!Route::is('home')) d-none @endif"
|
||||
href="@if (Route::is('home')) {{config('app.url') }}#promotions @else {{ route('products') }} @endif">
|
||||
Offres
|
||||
</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>
|
||||
<a class="nav-link d-lg-none" href="{{ route('contact') }}">Contact</a>
|
||||
<a class="nav-link d-lg-none" href="{{ route('faq') }}">FAQ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="d-none d-lg-block" method="GET" action="{{ route('search') }}">
|
||||
<input class="form-control w-fit rounded-4 border-dark"
|
||||
type="text"
|
||||
id="filter" name="filter"
|
||||
value="{{ $filter ?? ''}}"
|
||||
placeholder="Rechercher...">
|
||||
</form>
|
||||
@if (!Route::is('products'))
|
||||
<form class="d-none d-lg-block" method="GET" action="{{ route('products') }}">
|
||||
<input class="form-control w-fit rounded-4 border-dark"
|
||||
type="text"
|
||||
id="search" name="search"
|
||||
value="{{ $search ?? ''}}"
|
||||
placeholder="Rechercher...">
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<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-icon btn-search-icon d-lg-none p-0" role="button"></button>
|
||||
<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"><basket-counter></basket-counter></span>
|
||||
<span class="btn-basket-item position-absolute top-0 start-0 rounded-circle">
|
||||
<basket-counter></basket-counter>
|
||||
</span>
|
||||
<div class="btn-icon btn-basket-icon"></div>
|
||||
<span class="d-none d-lg-block"><basket-amount></basket-amount></span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<section class="auth-login 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">{{ $content->title }}</h1>
|
||||
<div class="col">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ $content->title }}</h1>
|
||||
@if ($content !== null)
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex flex-column justify-content-center align-items-center text-center">
|
||||
|
|
@ -19,5 +19,5 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#f9f7f3;background-color:#f9f7f3;width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
|
||||
<td style="direction:ltr;font-size:0px;padding:0 0 20px 0;text-align:center;">
|
||||
<!--[if mso | IE]>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Détail de votre Commande : <br><br></div>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Détail de votre Commande :<br></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -198,12 +198,21 @@
|
|||
<tr style="border-bottom:1px solid #ecedee;text-align:left;padding:15px 0;">
|
||||
<th style="padding: 0 15px 0 0;">Produit</th>
|
||||
<th style="padding: 0 15px;">Quantité</th>
|
||||
<th style="padding: 0 15px;">Prix kilo</th>
|
||||
<th style="padding: 0 0 0 15px;">Total</th>
|
||||
</tr> @foreach ($order->lines as $line) <tr>
|
||||
<td style="padding: 0 15px 0 0;">{{ $line->product->name }}</td>
|
||||
<td style="padding: 0 15px;">{{ $line->quantity }}</td>
|
||||
<td style="padding: 0 0 0 15px;">@fmt_currency($line->total_ttc)</td>
|
||||
</tr> @endforeach
|
||||
</tr>
|
||||
@foreach ($order->lines as $line)
|
||||
<tr>
|
||||
<td style="padding: 0 15px 0 0;">
|
||||
{{ $line->product->name }}@if ($line->product->weight_variable)*@endif
|
||||
</td>
|
||||
<td style="padding: 0 15px;">{{ $line->quantity }}</td>
|
||||
<td style="padding: 0 15px;">
|
||||
@if ($line->product->weight_variable) @fmt_currency($line->product->priceKgTtc) @endif
|
||||
</td>
|
||||
<td style="padding: 0 0 0 15px;">@fmt_currency($line->total_ttc)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -225,8 +234,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Total de la commande : @fmt_currency($order->total)</div>
|
||||
<td align="left" style="font-size:0px;padding:0px 25px;word-break:break-word;">
|
||||
<p style="margin:0 0 10px 0;color:red;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;">*Produit vendu au kilo. Le prix sera recalculé en fonction du poids du produit livré lors de la remise de votre commande.
|
||||
Le prix est donc susceptible de varier sur votre facture.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px 25px;word-break:break-word;">
|
||||
<p style="margin:0;color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;">NB: Nous faisons le maximum pour vous livrer l'intégralité de votre commande, malheureusement certains produits peuvent
|
||||
être en rupture. Vous ne serez pas facturé des produits non livrés.<br>
|
||||
Pour toutes questions <a href="{{ route('contact') }}" target="_blank">contactez-nous</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -248,14 +265,40 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l’adresse suivante :<br><br>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">
|
||||
Total estimé de la commande : @fmt_currency($order->total) TTC
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<p style="border-top:dashed 1px lightgrey;font-size:1px;margin:0px auto;width:100%;">
|
||||
</p>
|
||||
<!--[if mso | IE]>
|
||||
<table
|
||||
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:dashed 1px lightgrey;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px"
|
||||
>
|
||||
<tr>
|
||||
<td style="height:0;line-height:0;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">
|
||||
A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l’adresse suivante :<br><br>
|
||||
<b>Mon point de retrait {{$magasin->name}}, {{$magasin->address}}, {{$magasin->postcode}} {{$magasin->city}}</b>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:center;color:black;"><br><br>L'équipe {{ config('theme.site_name') }}</div>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:center;color:black;">
|
||||
<br>L'équipe {{ config('theme.site_name') }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#f9f7f3;background-color:#f9f7f3;width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
|
||||
<td style="direction:ltr;font-size:0px;padding:0 0 20px 0;text-align:center;">
|
||||
<!--[if mso | IE]>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Détail de votre Commande : <br><br></div>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Détail de votre Commande :<br></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -198,12 +198,21 @@
|
|||
<tr style="border-bottom:1px solid #ecedee;text-align:left;padding:15px 0;">
|
||||
<th style="padding: 0 15px 0 0;">Produit</th>
|
||||
<th style="padding: 0 15px;">Quantité</th>
|
||||
<th style="padding: 0 15px;">Prix kilo</th>
|
||||
<th style="padding: 0 0 0 15px;">Total</th>
|
||||
</tr> @foreach ($order->lines as $line) <tr>
|
||||
<td style="padding: 0 15px 0 0;">{{ $line->product->name }}</td>
|
||||
<td style="padding: 0 15px;">{{ $line->quantity }}</td>
|
||||
<td style="padding: 0 0 0 15px;">@fmt_currency($line->total_ttc)</td>
|
||||
</tr> @endforeach
|
||||
</tr>
|
||||
@foreach ($order->lines as $line)
|
||||
<tr>
|
||||
<td style="padding: 0 15px 0 0;">
|
||||
{{ $line->product->name }}@if ($line->product->weight_variable)*@endif
|
||||
</td>
|
||||
<td style="padding: 0 15px;">{{ $line->quantity }}</td>
|
||||
<td style="padding: 0 15px;">
|
||||
@if ($line->product->weight_variable) @fmt_currency($line->product->priceKgTtc) @endif
|
||||
</td>
|
||||
<td style="padding: 0 0 0 15px;">@fmt_currency($line->total_ttc)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -224,9 +233,41 @@
|
|||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px 25px;word-break:break-word;">
|
||||
<p style="margin:0 0 10px 0;color:red;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;">*Produit vendu au kilo. Le prix sera recalculé en fonction du poids du produit livré lors de la remise de votre commande.
|
||||
Le prix est donc susceptible de varier sur votre facture.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px 25px;word-break:break-word;">
|
||||
<p style="margin:0;color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;">NB: Nous faisons le maximum pour vous livrer l'intégralité de votre commande, malheureusement certains produits peuvent
|
||||
être en rupture. Vous ne serez pas facturé des produits non livrés.<br>
|
||||
Pour toutes questions <a href="{{ route('contact') }}" target="_blank">contactez-nous</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<p style="border-top:dashed 1px lightgrey;font-size:1px;margin:0px auto;width:100%;">
|
||||
</p>
|
||||
<!--[if mso | IE]>
|
||||
<table
|
||||
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:dashed 1px lightgrey;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px"
|
||||
>
|
||||
<tr>
|
||||
<td style="height:0;line-height:0;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">Total de la commande : @fmt_currency($order->total)</div>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">
|
||||
Total estimé de la commande : @fmt_currency($order->total) TTC
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -249,7 +290,8 @@
|
|||
@if (!empty($order->timeslot))
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l’adresse suivante :<br><br>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:left;color:black;">
|
||||
A retirer le <b>{{$order->timeslot->day}} à {{$order->timeslot->time}}</b>, à l’adresse suivante :<br><br>
|
||||
<b>Mon point de retrait {{$magasin->name}}, {{$magasin->address}}, {{$magasin->postcode}} {{$magasin->city}}</b>
|
||||
</div>
|
||||
</td>
|
||||
|
|
@ -257,7 +299,8 @@
|
|||
@endif
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:center;color:black;"><br><br>L'équipe {{ config('theme.site_name') }}</div>
|
||||
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:20px;line-height:1;text-align:center;color:black;">
|
||||
<br>L'équipe {{ config('theme.site_name') }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<div class="ldcweb-banner-title">
|
||||
<p aria-level="h1">{{ Config::get('theme.site_name') }} utilise des cookies !</p>
|
||||
</div>
|
||||
<p class="ldcweb-banner-para-p" data-open="Ce site web stocke les cookies sur votre ordinateur. XXXX utilise ces informations
|
||||
<p class="ldcweb-banner-para-p" data-open="Ce site web stocke les cookies sur votre ordinateur. LDC Sablé utilise ces informations
|
||||
afin d'améliorer et de personnaliser votre expérience de navigation, ainsi que pour l'analyse et les indicateurs concernant nos
|
||||
visiteurs à la fois sur ce site web et sur d'autres supports. Vous pouvez cliquer sur « Accepter » si vous consentez à l'utilisation
|
||||
de ces cookies." data-close="Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques.
|
||||
|
|
@ -33,8 +33,7 @@
|
|||
</div>
|
||||
<div class="ldcweb-banner-details">
|
||||
<p>Si vous refusez l'utilisation des cookies, vos informations ne seront pas suivies lors de votre visite sur ce site. Un cookie sera utilisé
|
||||
dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles.
|
||||
Vous pouvez changer d'avis et modifier votre consentement à tout moment en revenant sur ce site.
|
||||
dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d'avis et modifier votre consentement à tout moment en revenant sur ce site.
|
||||
Pour en savoir plus sur les cookies que nous utilisons, consultez notre <a href="{{ route('privacy') }}">charte de confidentialité</a>.</p>
|
||||
</div>
|
||||
<div class="ldcweb-banner-btnDetails">
|
||||
|
|
|
|||
17
resources/views/front/sable/partials/home-slider.blade.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!-- SLIDER -->
|
||||
@if (Route::is('home'))
|
||||
<article id="home-slider" class="row p-2 gx-0">
|
||||
<div class="swiper-container p-0 h-100">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($slides as $slide)
|
||||
<a class="swiper-slide d-flex justify-content-center align-items-center text-decoration-none px-2 px-md-5" href="{{ $slide->link }}">
|
||||
<h2 class="title-medium font-Barlow-extra-bold text-center text-white px-2 px-md-5">{{ $slide->title }}</h2>
|
||||
<img class="px-md-5" src="{{ asset('/images/slides/' . $slide->picture) }}">
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="swiper-button-next rounded-circle d-none d-md-flex mx-4"></div>
|
||||
<div class="swiper-button-prev rounded-circle d-none d-md-flex mx-4"></div>
|
||||
</div>
|
||||
</article>
|
||||
@endif
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="recap-actions d-flex flex-row justify-content-between align-items-center w-100 my-5">
|
||||
@if ( $activestep < 3 )
|
||||
<a class="btn d-none d-lg-block" href="{{ route('ranges') }}">⟵ Continuer mes achats</a>
|
||||
<a class="btn d-none d-lg-block" href="{{ route('products') }}">⟵ Continuer mes achats</a>
|
||||
@endif
|
||||
@if ( $activestep == 1 )
|
||||
<form action="{{ route('sales.order-init') }}" method="POST">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<article class="order col-lg-3 position-fixed start-0 position-lg-relative p-0 p-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-2 d-flex d-lg-none justify-content-start align-items-center p-0">
|
||||
<button class="btn">⟵</button>
|
||||
<a class="btn" href="{{ url()->previous() }}">⟵</a>
|
||||
</div>
|
||||
<div class="col-8 col-lg-12 p-0 p-lg-1 {{ $activestep == 1 ? "active" : ($activestep > 1 ? "step-done" : "") }}">
|
||||
<div class="row">
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<section class="auth-login 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">{{ $content->title }}</h1>
|
||||
<div class="col">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ $content->title }}</h1>
|
||||
@if ($content !== null)
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex flex-column justify-content-center align-items-center text-center">
|
||||
|
|
@ -19,5 +19,5 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
@extends('layouts.layout')
|
||||
@extends('layouts.layout',['brParam' => $product])
|
||||
|
||||
@section('title', __('Produit spécifique'))
|
||||
@section('description', 'Produit spécifique de la boutique.')
|
||||
|
||||
@section('breadcrumb', 'no')
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<main id="product" class="container pt-6 pt-lg-0">
|
||||
<section id="product" class="pt-6 pt-lg-0">
|
||||
<article class="row row-cols-1 row-cols-lg-3 m-0 card-promotion">
|
||||
<!-- PRODUCT'S IMAGE -->
|
||||
<div class="p-2">
|
||||
|
|
@ -35,21 +35,27 @@
|
|||
</div>
|
||||
</div>
|
||||
<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") }}">
|
||||
@if (isset($product->foodProduct->nutriscore))
|
||||
<img class="card-action-nutriscore m-3" src="{{ asset(config('app.theme') . "/img/nutriscore/nutriscore-" . $product->foodProduct->nutriscore . ".png") }}">
|
||||
@endif
|
||||
</div>
|
||||
<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())
|
||||
<div class="card-price d-flex justify-content-center align-items-center">
|
||||
{{-- @if ($product->promotions->count())
|
||||
<span class="card-price-original position-relative">@fmt_currency($product->priceTtc)</span>
|
||||
@endif
|
||||
<span class="@if ($product->promotions->count()) card-price-new @endif h3 m-0">@fmt_currency($product->discountedPriceTtc) @fmt_sellunit($product->sell_unit)</span>
|
||||
@endif --}}
|
||||
<p class="m-0">
|
||||
<span>@if ($product->weight_variable) Environ* @endif</span>
|
||||
<span class="{{-- @if ($product->promotions->count()) card-price-new @endif --}} font-Barlow-bold h4 ms-1">@fmt_currency($product->discountedPriceTtc)</span>
|
||||
<span class="text-lowercase">/{{ $product->sell_unit }}</span>
|
||||
</p>
|
||||
</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>
|
||||
<p class="fst-italic text-muted">*Produit vendu au kilo : @fmt_currency($product->priceKgTtc)/kg</p>
|
||||
@endif
|
||||
</div>
|
||||
<!-- PRODUCT'S DETAILS -->
|
||||
|
|
@ -164,5 +170,5 @@
|
|||
--}}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -6,16 +6,19 @@
|
|||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<main id="ranges" class="container vue-apps">
|
||||
<section id="ranges" class="vue-apps">
|
||||
@php
|
||||
$dataComponent = [
|
||||
'hasPromotion' => request()->promotion ? true : false,
|
||||
'ranges' => $ranges,
|
||||
'brands' => \App\Enums\ProductBrand::toArray(),
|
||||
'tags' => $tags,
|
||||
'products' => \App\Http\Resources\ProductResource::collection($products)
|
||||
'products' => \App\Http\Resources\ProductResource::collection($products),
|
||||
'productsResults' => $products->perPage(),
|
||||
'search' => $sessionFilter->search ?? '',
|
||||
'filters' => $sessionFilter,
|
||||
];
|
||||
@endphp
|
||||
<filter-component json-data='@json($dataComponent)'/>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@
|
|||
@section('title', __('Validation de commande'))
|
||||
@section('description', 'Validation de votre commande.')
|
||||
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main id="command" class="container">
|
||||
<p class="breadcrumb d-none d-lg-block text-muted p-2 m-0">Accueil / Panier / Validation</p>
|
||||
<div class="row m-0">
|
||||
@include('partials.tunnel-stepper')
|
||||
<article class="col mt-6 m-lg-0">
|
||||
|
|
@ -39,7 +38,6 @@
|
|||
<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="{{ route('home') }}" role="button">Retour à la boutique</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
@section('content')
|
||||
<main id="command" class="container">
|
||||
<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="{{ route('sales.order-save-slot') }}" method="POST" class="col mt-6 m-lg-0">
|
||||
|
|
@ -32,7 +31,7 @@
|
|||
<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">
|
||||
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Suivant >">
|
||||
<input type="submit" class="btn btn-product w-100 w-lg-fit text-uppercase font-Barlow-extra-bold rounded-4" value="Valider >">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
@section('title', __('Recapitulatif de commande'))
|
||||
@section('description', 'Recapitulatif de votre commande.')
|
||||
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<main id="command" class="container">
|
||||
<p class="breadcrumb d-none d-lg-block text-muted p-2 m-0">Accueil / Panier / Validation</p>
|
||||
<div class="row m-0">
|
||||
@include('partials.tunnel-stepper')
|
||||
<article class="col mt-6 m-lg-0">
|
||||
|
|
@ -14,8 +15,9 @@
|
|||
<table class="table m-0">
|
||||
<thead class="d-none d-lg-table-header-group border-bottom border-dark">
|
||||
<tr>
|
||||
<td scope="col" class=""></td>
|
||||
<td scope="col"></td>
|
||||
<td scope="col" class="text-center align-middle">Quantité</td>
|
||||
<td scope="col" class="text-center align-middle">Prix au KG TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Prix TTC</td>
|
||||
<td scope="col" class="text-center align-middle">Sous-total TTC</td>
|
||||
</tr>
|
||||
|
|
@ -28,35 +30,36 @@
|
|||
<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>
|
||||
<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>
|
||||
@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
|
||||
</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>
|
||||
<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-body d-flex flex-column justify-content-between justify-content-lg-center align-items-start w-75 h-100 ps-2">
|
||||
<a href="{{ route('product', ['productSlug' => $cartItem->model->slug]) }}"
|
||||
class="text-decoration-none"
|
||||
title="{{ $cartItem->name }}" target="_self">
|
||||
<p class="title-small font-Barlow-bold stretched-link text-dark m-0">
|
||||
{{ $cartItem->name }}
|
||||
</p>
|
||||
</a>
|
||||
@if($cartItem->model->description) <div class="card-text">{!! $cartItem->model->description !!}</div> @endif
|
||||
<p class="fst-italic text-muted my-2 @if (!$cartItem->model->weight_variable) d-none @endif">*Produit vendu au kilo : @fmt_currency($cartItem->model->priceKgTtc)/kg</p>
|
||||
<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">
|
||||
@if ($cartItem->model->promotions->count())
|
||||
<div class="card-price d-flex flex-row justify-content-center align-items-center">
|
||||
{{-- @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>
|
||||
@endif --}}
|
||||
<span class="card-price-new d-block d-lg-none {{-- @if ($cartItem->model->promotions->count()) text-red @endif --}} ms-1">
|
||||
{{ sprintf('%s €', number_format($cartItem->model->discountedPriceTtc * $cartItem->qty, 2, ',', ' ')) }}
|
||||
</span>
|
||||
</div>
|
||||
<a href="#" class="btn btn-product d-block d-lg-none text-white rounded-4 btn-basket icon-cart-white"></a>
|
||||
{{--<div class="d-block d-lg-none">
|
||||
<basket-buttons :product-id='{{ $cartItem->model->id }}'></basket-buttons>
|
||||
</div>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -64,10 +67,19 @@
|
|||
</td>
|
||||
<!-- END CARD -->
|
||||
<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 class="d-none d-lg-table-cell title-small border-0 text-center align-middle font-Barlow-extra-bold">
|
||||
@if ($cartItem->model->weight_variable) @fmt_currency($cartItem->model->priceKgTtc) @endif
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
@if ($cartItem->model->weight_variable) <span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span> @endif
|
||||
<span class="font-Barlow-extra-bold">@fmt_currency($cartItem->model->discountedPriceTtc)</span>
|
||||
</td>
|
||||
<td class="position-relative d-none d-lg-table-cell title-small border-0 text-center align-middle">
|
||||
@if ($cartItem->model->weight_variable) <span class="position-absolute top-0 start-50 translate-middle-x mt-4 pt-3 fs-7 text-muted">Environ*</span> @endif
|
||||
<span class="font-Barlow-extra-bold">{{ sprintf('%s €', number_format($cartItem->model->discountedPriceTtc * $cartItem->qty, 2, ',', ' ')) }}</span>
|
||||
</td>
|
||||
<td class="w-0 p-0">
|
||||
<button class="btn btn-cross position-absolute icon-medium icon-cross" type="button" value="{{ $cartItem->rowId }}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -43,11 +43,24 @@ img {
|
|||
}
|
||||
}
|
||||
|
||||
&-text p {
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
&-text {
|
||||
height: calc(1em * 1.5 * 2);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
p {
|
||||
display: block;
|
||||
display: -webkit-box;
|
||||
max-width: 250px;
|
||||
height: calc(1em * 1.5 * 2);
|
||||
margin: 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.5;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
&-activate {
|
||||
|
|
@ -135,7 +148,8 @@ img {
|
|||
.auth {
|
||||
&-login {
|
||||
form {
|
||||
width: 25rem;
|
||||
width: 100%;
|
||||
max-width: 25rem;
|
||||
|
||||
.form-control {
|
||||
width: 20rem;
|
||||
|
|
|
|||
|
|
@ -1,61 +1,61 @@
|
|||
@font-face {
|
||||
font-family: "Barlow_Extra_Bold";
|
||||
src: url("../fonts/barlow/Barlow-ExtraBold.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url("../fonts/barlow/Barlow-ExtraBold.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow_Regular";
|
||||
src: url("../fonts/barlow/Barlow-Regular.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url("../fonts/barlow/Barlow-Regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow_Bold";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src:
|
||||
url("../fonts/barlow/Barlow-Bold.woff2") format("ttf"),
|
||||
url("../fonts/barlow/Barlow-Bold.woff") format("woff"),
|
||||
url("../fonts/barlow/Barlow-Bold.ttf") format("ttf"),
|
||||
url("../fonts/barlow/Barlow-Bold.svg") format("svg"),
|
||||
url("../fonts/barlow/Barlow-Bold.eot") format("eot");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow_Condensed_Medium";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src:
|
||||
url("../fonts/barlow/BarlowCondensed-Medium.woff2") format("ttf"),
|
||||
url("../fonts/barlow/BarlowCondensed-Medium.woff") format("woff"),
|
||||
url("../fonts/barlow/BarlowCondensed-Medium.ttf") format("ttf"),
|
||||
url("../fonts/barlow/BarlowCondensed-Medium.svg") format("svg"),
|
||||
url("../fonts/barlow/BarlowCondensed-Medium.eot") format("eot");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow_Condensed_Semi_Bold";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src:
|
||||
url("../fonts/barlow/BarlowCondensed-SemiBold.woff2") format("ttf"),
|
||||
url("../fonts/barlow/BarlowCondensed-SemiBold.woff") format("woff"),
|
||||
url("../fonts/barlow/BarlowCondensed-SemiBold.ttf") format("ttf"),
|
||||
url("../fonts/barlow/BarlowCondensed-SemiBold.svg") format("svg"),
|
||||
url("../fonts/barlow/BarlowCondensed-SemiBold.eot") format("eot");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow_Medium";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src:
|
||||
url("../fonts/barlow/Barlow-Medium.woff2") format("ttf"),
|
||||
url("../fonts/barlow/Barlow-Medium.woff") format("woff"),
|
||||
url("../fonts/barlow/Barlow-Medium.ttf") format("ttf"),
|
||||
url("../fonts/barlow/Barlow-Medium.svg") format("svg"),
|
||||
url("../fonts/barlow/Barlow-Medium.eot") format("eot");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,10 @@
|
|||
@include btn($white, none, $orange);
|
||||
}
|
||||
|
||||
.btn-more-products svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.btn-section {
|
||||
margin-top: 1rem;
|
||||
@include btn($dark, 1px solid $dark, transparent);
|
||||
|
|
@ -127,10 +131,6 @@
|
|||
fill: $dark;
|
||||
}
|
||||
|
||||
.w-fit {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
box-shadow: $shadow !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.timeslot-container .card-text {
|
||||
height: initial;
|
||||
overflow: initial;
|
||||
text-overflow: initial;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0 0.5rem;
|
||||
|
|
@ -127,7 +133,7 @@
|
|||
background-color: transparent;
|
||||
|
||||
td.text-center {
|
||||
width: 20%;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.card:hover .filtre {
|
||||
|
|
@ -147,7 +153,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.recap-actions {
|
||||
bottom: auto;
|
||||
}
|
||||
|
|
@ -190,4 +196,4 @@
|
|||
// XXXXXXX XXXXXXXXXXXXXX XXXXXXXLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
@include media-breakpoint-up(xxl) { //1400px
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@
|
|||
overflow: visible;
|
||||
}
|
||||
|
||||
&-slide {
|
||||
height: 30rem !important;
|
||||
}
|
||||
|
||||
&-button-next {
|
||||
right: 0;
|
||||
}
|
||||
|
|
@ -63,11 +67,6 @@
|
|||
}
|
||||
|
||||
#services {
|
||||
#demarche {
|
||||
.card-body p {
|
||||
font-size: .8em;
|
||||
}
|
||||
}
|
||||
#avantages {
|
||||
.card {
|
||||
.card-img-top {
|
||||
|
|
@ -137,36 +136,6 @@
|
|||
scroll-margin-top: 5rem;
|
||||
}
|
||||
|
||||
#promotions {
|
||||
.swiper {
|
||||
&-container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
&-button {
|
||||
&-next, &-prev {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
background-color: $orange;
|
||||
|
||||
&::after {
|
||||
color: $white;
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
&-disabled {
|
||||
border: 1px solid $grey;
|
||||
background-color: transparent;
|
||||
|
||||
&::after {
|
||||
color: $grey !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#rayons {
|
||||
.row-cols-2 .row {
|
||||
&:hover {
|
||||
|
|
@ -215,7 +184,41 @@
|
|||
// L::::::::::::::::::::::L GGG::::::GGG:::G
|
||||
// LLLLLLLLLLLLLLLLLLLLLLLL GGGGGG GGGG
|
||||
@include media-breakpoint-up(lg) { //992px
|
||||
//
|
||||
#promotions {
|
||||
.swiper {
|
||||
&-container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
&-slide {
|
||||
.row {
|
||||
max-width: 20rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-button {
|
||||
&-next, &-prev {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
background-color: $orange;
|
||||
|
||||
&::after {
|
||||
color: $white;
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
&-disabled {
|
||||
border: 1px solid $grey;
|
||||
background-color: transparent;
|
||||
|
||||
&::after {
|
||||
color: $grey !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// XXXXXXX XXXXXXXLLLLLLLLLLL
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
font-size: 2em;
|
||||
}
|
||||
|
||||
button .svg {
|
||||
button svg {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
|
|
@ -148,11 +148,11 @@
|
|||
}
|
||||
|
||||
button {
|
||||
&[aria-expanded=true] .svg {
|
||||
&[aria-expanded=true] svg {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.svg {
|
||||
svg {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
|
@ -167,6 +167,16 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.products {
|
||||
.card-body {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
height: 20rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
// XXXXXXX XXXXXXXLLLLLLLLLLL
|
||||
// X:::::X X:::::XL:::::::::L
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@
|
|||
background-position: center;
|
||||
}
|
||||
|
||||
&-basket-item {
|
||||
color: $dark;
|
||||
background-color: $white;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
margin: -.5rem -1rem;
|
||||
}
|
||||
|
||||
&-basket-icon {
|
||||
background-image: url("../img/icons/icon_cart_white.png");
|
||||
}
|
||||
|
|
@ -145,10 +153,8 @@
|
|||
|
||||
.btn {
|
||||
&-basket-item {
|
||||
color: $white;
|
||||
background-color: $dark;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
margin: -.5rem -1rem;
|
||||
}
|
||||
|
||||
&-basket-icon {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@ $spacers-override: (
|
|||
);
|
||||
$spacers: map-merge($spacers-override, $spacers);
|
||||
|
||||
|
||||
$h7-font-size: $font-size-base * 0.85;
|
||||
$font-sizes-override: (
|
||||
7: $h7-font-size
|
||||
);
|
||||
$font-sizes: map-merge($font-sizes-override, $font-sizes);
|
||||
|
||||
|
||||
// RESPONSIVE VARIABLES FOR BOOTSTRAP
|
||||
/**
|
||||
* FORMAT : 'class name' ('attribute(s) added') (key:values, key:values...),
|
||||
|
|
@ -11,10 +19,10 @@ $spacers: map-merge($spacers-override, $spacers);
|
|||
* RESULT : .w-sm-25 { width: 25%; } | .w-md-100 { width: 100%; } etc...
|
||||
*/
|
||||
$targets: (
|
||||
'w' ('width') (0:0%, 25:25%, 50:50%, 75:75%, 100:100%, auto:auto, fit:fit-content),
|
||||
'w' ('width') (0:0%, 8:8rem, 25:25%, 50:50%, 75:75%, 100:100%, auto:auto, fit:fit-content),
|
||||
'h' ('height') (0:0%, 25:25%, 50:50%, 75:75%, 100:100%, auto:auto, fit:fit-content),
|
||||
'opacity' ('opacity') (0:0, 25:0.25, 50:0.50, 75:0.75, 100:1),
|
||||
'position' ('position') (relative:relative, absolute:absolute, fixed:fixed, sticky:sticky),
|
||||
'text' ('text') (center:center, start:left, end:right),
|
||||
'd' ('display') (block:block, flex:flex, table-header-group:table-header-group, table-cell:table-cell, none:none)
|
||||
);
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
@section('breadcrumb', 'no')
|
||||
|
||||
@section('content')
|
||||
<main class="auth-login container d-flex justify-content-center align-items-center">
|
||||
<section class="auth-login 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">{{ $content->title }}</h1>
|
||||
<div class="col">
|
||||
<h1 class="title-medium font-Barlow-extra-bold text-uppercase text-grey text-center">{{ $content->title }}</h1>
|
||||
@if ($content !== null)
|
||||
<div class="row mt-2">
|
||||
<div class="col d-flex flex-column justify-content-center align-items-center text-center">
|
||||
|
|
@ -19,5 +19,5 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
return [
|
||||
'theme_name' => 'sable',
|
||||
'site_name' => 'Boutique Sablé',
|
||||
'site_name' => 'La Boutique de Cocotte',
|
||||
'company' => 'LDC',
|
||||
'analytics' => '',
|
||||
'product_image_maxwidth' => '500',
|
||||
|
|
|
|||