@extends('frontend.layouts.template-base') @section('meta_tags') @include('frontend.layouts.meta-tags', ['title' => 'Chotekisan', 'page' => 'Deals']) @endsection @section('content') @php $dealsSections = collect($dealsSections ?? []); $dealsBannersByPosition = collect($dealsBannersByPosition ?? []); $dealsCategoryUrl = route('frontend.category', array_filter(['category_id' => $dealsCategory?->id ?? null])); @endphp
{{-- Deals Section Banner start --}}

Best Deals Freshly

From healthy groceries to ready-to-eat bowls, enjoy handpicked deals at prices that make shopping better and fresher.

cart cart @for ($i = 1; $i <= 32; $i++) products @endfor icon icon icon icon
{{-- Deals Section Banner end --}} @if (!$dealsLoadError && ($dealsSections->isNotEmpty() || $dealsBannersByPosition->isNotEmpty()))
@foreach ($dealsSections as $dealsSectionIndex => $dealsSection) @foreach ($dealsBannersByPosition->get($dealsSectionIndex, collect()) as $dealsBanner) @include('frontend.components.home-sections.poster', ['section' => (object) ['banners' => collect([$dealsBanner]), 'background_image' => null]]) @endforeach @php $sectionStyle = strtolower((string) ($dealsSection->style?->name ?: $dealsSection->section_type)); $hasPosterBackground = str_contains($sectionStyle, 'poster') && $dealsSection->banners->isEmpty() && !empty($dealsSection->background_image); $hasRenderableContent = $dealsSection->products->isNotEmpty() || $dealsSection->groups->isNotEmpty() || $dealsSection->tabs->flatMap(fn ($tab) => $tab->products)->isNotEmpty() || $hasPosterBackground; @endphp @if ($hasRenderableContent) @endif @endforeach @foreach ($dealsBannersByPosition->get($dealsSections->count(), collect()) as $dealsBanner) @include('frontend.components.home-sections.poster', ['section' => (object) ['banners' => collect([$dealsBanner]), 'background_image' => null]]) @endforeach
@endif
@endsection @section('scripts') @endsection