@extends('themes.smartbazar.layouts.master') @section('title', \App\Services\ThemeProfileService::metaTitle()) @section('content') @php use App\Models\Product; use App\Services\ThemeCatalogService; $hp = $hp ?? ($homepageSettings ?? []); $useBuilder = \App\Services\HomepageSettingsService::usesPageBuilder(); $sliderMs = max(2000, min(15000, (int) ($hp['slider_interval'] ?? 4500))); $brandName = $themeBrand['name'] ?? \App\Services\ThemeProfileService::brandName(); @endphp @if($useBuilder) @include('frontEnd.partials.grapes-content') @else
@if($banners->count() > 0) @else

{{ $brandName }}

Fresh grocery, organic & daily essentials — delivered nationwide

Shop Now
@endif
@if(!empty($hp['show_promo_banners']) && ($promoBanners ?? collect())->count())
Flash Sale @foreach($promoBanners as $promo) {{ $promo->title ?: 'Special Offer' }} @endforeach
@endif @if(!empty($hp['show_categories']) && $categories->count() > 0) @endif @if(!empty($hp['show_bestsellers']) && ($bestSellers ?? collect())->count() > 0)

Top Selling Products

@foreach($bestSellers->take(4) as $product) @include('themes.smartbazar.layouts.product-card', compact('product')) @endforeach
@endif @if(!empty($hp['show_brands']))

Our Brands

See all
@foreach($categories->take(5) as $cat) @if($cat->image) {{ $cat->name }} @else {{ Str::limit($cat->name, 12) }} @endif @endforeach
@endif @if(!empty($hp['show_category_sections'])) @foreach($categories->take(6) as $cat) @php $catProducts = Product::where('status', 1) ->where(function ($q) use ($cat) { $q->where('category_id', $cat->id) ->orWhereIn('category_id', $cat->children()->where('status', 1)->pluck('id')); }); ThemeCatalogService::scopeProducts($catProducts); $catProducts = $catProducts->latest()->limit(10)->get(); @endphp @if($catProducts->count())

{{ $cat->name }}

View all items
@foreach($catProducts as $product) @include('themes.smartbazar.layouts.product-card', compact('product')) @endforeach
@endif @endforeach @endif @if(!empty($hp['show_combo']) && ($comboProducts ?? collect())->count() > 0)

Exclusive Combo Deals

View All Combos
@foreach($comboProducts as $product)
@php $cp = $product->sale_price ?? $product->price; $op = $product->price; $comboDisc = ($product->sale_price && $product->sale_price < $product->price) ? round((($op - $cp) / $op) * 100, 1) : 0; @endphp @if($comboDisc > 0)Save {{ $comboDisc }}% Combo Offer@endif {{ $product->name }}
৳{{ number_format($cp, 2) }} @if($product->sale_price && $product->sale_price < $product->price) ৳{{ number_format($op, 2) }} @endif
View Details
@endforeach
@endif @if(!empty($hp['show_popular']) && ($popularProducts ?? $newArrivals)->count() > 0)

Just For You

View All Products
@foreach(($popularProducts ?? $newArrivals) as $product) @include('themes.smartbazar.layouts.product-card', compact('product')) @endforeach
@endif @if(!empty($hp['show_testimonials'])) @php try { $reviews = \App\Models\Review::where('status',1)->latest()->limit(5)->get(); } catch(\Exception $e) { $reviews = collect(); } @endphp @if($reviews->count())
@foreach($reviews as $r)

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

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