@extends('themes.organic.layouts.master') @section('title', \App\Services\ThemeProfileService::metaTitle()) @section('content') @php $hp = $hp ?? ($homepageSettings ?? []); $useBuilder = \App\Services\HomepageSettingsService::usesPageBuilder(); $sliderMs = max(2000, min(15000, (int) ($hp['slider_interval'] ?? 4500))); $firstHero = $banners->first(); @endphp @if($firstHero && !$useBuilder) @push('head-preload') @endpush @endif @if($useBuilder) @include('frontEnd.partials.grapes-content') @else {{-- ══ 1. Hero: Left Category Sidebar + Right Slider (Organic centered) ══ --}}
@include('themes.shared.hero-category-sidebar', ['categories' => $categories])
@if($banners->count() > 0) @else

🌿 প্রাকৃতিক পণ্যের সেরা গন্তব্য

১০০% অর্গানিক ও আয়ুর্বেদিক পণ্য — সারাদেশে ডেলিভারি

Shop Now
@endif
{{-- ══ 2. Trust Bar ══ --}} @include('themes.shared.trust-bar', ['hp' => $hp]) {{-- ══ 3. Categories — style from Homepage Settings ══ --}} @include('themes.shared.home-categories', ['hp' => $hp, 'categories' => $categories]) {{-- ══ 3b. Promo Cards (3 banners after categories) ══ --}} @php $promoCards = \App\Services\HomepagePromoCardsService::activeCards($hp); @endphp @if($promoCards->isNotEmpty()) @include('themes.shared.home-promo-cards', ['cards' => $promoCards]) @endif {{-- ══ 4. Trending Now (Neemba carousel) ══ --}} @if(!empty($hp['show_trending']) && ($trendingProducts ?? $featuredProducts)->count() > 0) @endif {{-- ══ 5. Best Combo Offer ══ --}} @if(!empty($hp['show_combo']) && ($comboProducts ?? collect())->count() > 0)
@include('themes.organic.partials.category-section-head', [ 'title' => 'Best Combo Offer', 'count' => ($comboProducts ?? collect())->count(), 'url' => route('frontend.combo-offers'), 'iconClass' => 'fas fa-gift', ])
@foreach($comboProducts as $product) @include('themes.organic.layouts.product-card', compact('product')) @endforeach
@endif {{-- ══ 6. Category-wise product blocks (Skin Care, Hair Care, etc.) ══ --}} @if(!empty($hp['show_category_sections'])) @foreach($categories->take(6) as $cat) @php $childIds = $cat->children()->where('status', 1)->pluck('id'); $catProductQuery = \App\Models\Product::withCount([ 'reviews as reviews_count' => fn ($q) => $q->where('status', 1), 'variants as variants_count' => fn ($q) => $q->where('status', 1), ])->withAvg(['reviews as avg_rating' => fn ($q) => $q->where('status', 1)], 'rating') ->where('status', 1) ->where(function ($q) use ($cat, $childIds) { $q->where('category_id', $cat->id); if ($childIds->isNotEmpty()) { $q->orWhereIn('category_id', $childIds); } }); \App\Services\ThemeCatalogService::scopeProducts($catProductQuery); $catProducts = $catProductQuery->latest()->limit(12)->get(); $catTotal = (int) ($cat->products_count ?? $catProducts->count()); @endphp @if($catProducts->count() > 0)
@include('themes.organic.partials.category-section-head', [ 'title' => $cat->name, 'count' => $catTotal, 'url' => route('frontend.category', $cat->slug), 'icon' => $cat->image, 'iconClass' => $cat->iconClass(), ])
@foreach($catProducts as $product) @include('themes.organic.layouts.product-card', compact('product')) @endforeach
@endif @endforeach @endif {{-- ══ 7. Popular Products ══ --}} @if(!empty($hp['show_popular']) && ($popularProducts ?? $newArrivals)->count() > 0) @endif {{-- ══ Optional sections ══ --}} @if(!empty($hp['show_bestsellers']) && isset($bestSellers) && $bestSellers->count() > 0)
@include('themes.organic.partials.category-section-head', [ 'title' => 'Best Sellers', 'count' => $bestSellers->count(), 'url' => route('frontend.products'), 'iconClass' => 'fas fa-fire', ])
@foreach($bestSellers as $product) @include('themes.organic.layouts.product-card', compact('product')) @endforeach
@endif @if(!empty($hp['show_order_tracking'])) @include('frontEnd.partials.order-tracking-home') @endif @if(!empty($hp['show_testimonials'])) @php try { $reviews = \App\Models\Review::where('status',1)->with('product')->latest()->limit(6)->get(); } catch(\Exception $e) { $reviews = collect(); } @endphp @if($reviews->count() > 0)

⭐ গ্রাহকদের মতামত

আমাদের সন্তুষ্ট গ্রাহকরা কী বলছেন

@foreach($reviews as $r)
@for($i=1;$i<=5;$i++)@endfor

"{{ Str::limit($r->comment, 120) }}"

{{ strtoupper(substr($r->name,0,1)) }}
{{ $r->name }}
{{ $r->created_at->format('d M Y') }}
@endforeach
@endif @endif @endif @endsection @push('scripts') @endpush