@extends('front.layout') @section('pagename') - {{ $pageHeading ?? __('Shops') }} @endsection @section('meta-description', !empty($seo) ? $seo->listing_page_meta_description : '') @section('meta-keywords', !empty($seo) ? $seo->listing_page_meta_keyword : '') @section('styles') @endsection @section('content') @php // Fetch all theme template screenshots keyed by theme name $themeTemplates = \App\Models\User::where('preview_template', 1) ->whereHas('basic_setting') ->with('basic_setting') ->get() ->mapWithKeys(function($item) { $themeName = $item->basic_setting ? $item->basic_setting->theme : null; return $themeName ? [$themeName => $item->template_img] : []; }) ->toArray(); // Get all user themes to prevent N+1 queries in the loop $userIds = $users->pluck('id')->toArray(); $userThemes = \App\Models\User\BasicSetting::whereIn('user_id', $userIds) ->pluck('theme', 'user_id') ->toArray(); // Friendly display labels for known themes. $themeLabelMap = [ 'vegetables' => ['category' => 'grocery', 'name' => __('Grocery')], 'grocery' => ['category' => 'grocery', 'name' => __('Grocery')], 'grocery2' => ['category' => 'grocery', 'name' => __('Ecom Grocery')], 'manti' => ['category' => 'multipurpose', 'name' => __('Multipurpose')], 'multipurpose' => ['category' => 'multipurpose', 'name' => __('Multipurpose')], 'fashion' => ['category' => 'fashion', 'name' => __('Fashion')], 'apparel' => ['category' => 'fashion', 'name' => __('Fashion')], 'jewellery' => ['category' => 'fashion', 'name' => __('Fashion')], 'kids' => ['category' => 'fashion', 'name' => __('Fashion')], 'electronics' => ['category' => 'electronics', 'name' => __('Electronics')], 'gadgets' => ['category' => 'electronics', 'name' => __('Electronics')], 'beauty' => ['category' => 'beauty', 'name' => __('Beauty')], 'cosmetics' => ['category' => 'beauty', 'name' => __('Beauty')], 'skinflow' => ['category' => 'beauty', 'name' => __('Beauty')], 'furniture' => ['category' => 'furniture', 'name' => __('Furniture')], ]; @endphp
{{ !empty(@$homeSec->shops_hero_badge) ? @$homeSec->shops_hero_badge : __('Customer Stores') }}

{!! !empty(@$homeSec->shops_hero_title) ? @$homeSec->shops_hero_title : __('Discover Stores') . '
' . __('Built on') . ' EcomBuilder.in' !!}

{!! !empty(@$homeSec->shops_hero_subtitle) ? nl2br(e(@$homeSec->shops_hero_subtitle)) : __('Real merchants. Real success. Real stories.') . '
' . __('Explore live stores across every industry and see how entrepreneurs are growing with EcomBuilder.in.') !!}

{{ !empty(@$homeSec->shops_hero_feat1_text) ? @$homeSec->shops_hero_feat1_text : __('Launch Instantly') }} {{ !empty(@$homeSec->shops_hero_feat2_text) ? @$homeSec->shops_hero_feat2_text : __('10-Days Money Back Guarantee') }} {{ !empty(@$homeSec->shops_hero_feat3_text) ? @$homeSec->shops_hero_feat3_text : __('24/7 Expert Support') }}
Jewellery theme
Skinflow theme
Grocery theme
Fashion theme
{{ @$homeSec->shops_stat1_value ?? '250+' }}
{{ @$homeSec->shops_stat1_label ?? __('Stores Launched') }}
{{ @$homeSec->shops_stat2_value ?? '15+' }}
{{ @$homeSec->shops_stat2_label ?? __('Premium Themes') }}
{{ @$homeSec->shops_stat3_value ?? '99.99%' }}
{{ @$homeSec->shops_stat3_label ?? __('Uptime Guarantee') }}
{{ @$homeSec->shops_stat4_value ?? '500+' }}
{{ @$homeSec->shops_stat4_label ?? __('Happy Merchants') }}
@if (count($users) == 0)

{{ __('NO STORE FOUND') }}

@else
@foreach ($users as $user) @php $shopName = $user->shop_name ?: $user->username; $rating = $user->landing_rating ?: '4.8'; $desc = $user->landing_description ?: 'Modern storefront offering premium services and products.'; $userTheme = $userThemes[$user->id] ?? null; $themeLabel = $userTheme && isset($themeLabelMap[$userTheme]) ? $themeLabelMap[$userTheme] : null; // Category Mapping: prefer theme label (English), then convert slug, never use raw DB name (may be Arabic/other lang). if ($themeLabel) { $catName = $themeLabel['name']; $catSlug = $themeLabel['category']; } elseif ($user->category) { $catSlug = strtolower($user->category->slug); $catName = $user->category->name; } else { $catName = __('Store'); $catSlug = 'store'; } $catClass = 'cat-' . (str_contains($catSlug, 'beauty') ? 'beauty' : (str_contains($catSlug, 'grocery') ? 'grocery' : (str_contains($catSlug, 'fashion') ? 'fashion' : (str_contains($catSlug, 'kids') ? 'kids' : (str_contains($catSlug, 'jewel') ? 'jewellery' : (str_contains($catSlug, 'electro') ? 'electronics' : (str_contains($catSlug, 'furnit') ? 'furniture' : (str_contains($catSlug, 'multi') ? 'multipurpose' : 'default')))))))); // Images Mapping - Automatically fetch screenshot of the theme the subdomain/shop is using $bannerFile = $user->template_img; if (empty($bannerFile)) { if ($userTheme && isset($themeTemplates[$userTheme])) { $bannerFile = $themeTemplates[$userTheme]; } } $bannerImg = !empty($bannerFile) ? asset('assets/front/img/template-previews/' . $bannerFile) : asset('assets/front/images/placeholder.png'); $logoImg = !empty(optional($user->basic_setting)->logo) ? asset('assets/front/img/user/' . $user->basic_setting->logo) : (!empty($user->photo) ? asset('assets/front/img/user/' . $user->photo) : asset('assets/user/img/profile.png')); @endphp
{{ $shopName }}
{{ $shopName }} Logo

{{ $shopName }}

{{ $rating }}
{{ $catName }}

{{ __($desc) }}

@endforeach
@endif

{{ !empty(@$homeSec->shops_loved_merchants_title) ? @$homeSec->shops_loved_merchants_title : __('Loved by Merchants') }}

{{ !empty(@$homeSec->shops_loved_merchants_subtitle) ? @$homeSec->shops_loved_merchants_subtitle : __('Hear from store owners who are growing their business with EcomBuilder.in.') }}

@if(isset($lovedMerchants) && count($lovedMerchants) > 0) @foreach($lovedMerchants as $rev)
@for($s = 1; $s <= ($rev->rating ?? 5); $s++) @endfor

"{{ $rev->quote }}"

{{ $rev->name }}

{{ $rev->designation }}
@endforeach @else

"I love how customizable everything is. My store looks premium and my customers trust my brand."

Priya Mehta

Founder, Skinflow

"From setup to sales, EcomBuilder.in has been my growth partner. Highly recommended!"

Ayaan Patel

Founder, Electri
@endif

{{ !empty(@$homeSec->shops_why_choose_title) ? @$homeSec->shops_why_choose_title : __('Why Choose Stores Built on EcomBuilder.in?') }}

@if(isset($whyChooseCards) && count($whyChooseCards) > 0) @foreach($whyChooseCards as $card)

{{ $card->name }}

{{ $card->quote }}

@endforeach @else

{{ __('Beautiful & Fast Themes') }}

{{ __('Mobile-first, high-converting themes that look stunning.') }}

{{ __('Easy Customization') }}

{{ __('Build your brand your way without any coding.') }}

{{ __('Powerful Features') }}

{{ __('Everything you need to sell, grow & succeed online.') }}

{{ __('Trusted Support') }}

{{ __('Dedicated support team whenever you need us.') }}

{{ __('Secure & Reliable') }}

{{ __('Built on a secure platform you can count on.') }}

@endif
@include('front.partials.bottom_cta', ['page' => 'shops']) @endsection @section('scripts') @endsection