@php use App\Services\StoreService; use App\Services\TranslationService; use App\Services\MediaService; $store_settings = app(StoreService::class)->getStoreSettings(); $language_code = app(TranslationService::class)->getLanguageCode(); $category_section_title = $store_settings['category_section_title'] ?? 'Categories'; // dd($store_settings['category_section_title']); @endphp
{{-- Slideshow --}}
@foreach ($sliders as $slider)
@if ($slider['type'] !== 'default')
slideshow
@else
slideshow
@endif
@endforeach
{{-- Offers --}}
{{-- Slick JS --}} {{-- Featured Section --}} @foreach ($sections as $count_key => $row) @if ($count_key == 0) {{-- Display only the first section --}} @if (!empty($row->product_details) && count((array) $row->product_details) > 0) @if ($row->style == 'style_1')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @if ($row->style == 'style_2')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.shop_now', 'Shop Now') }}
@endif @if ($row->style == 'style_3')
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.explore_now', 'Explore Now') }}
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @endif @endif @endforeach {{-- @dd($offers); --}} {{-- Offer Section --}} @php $Thirdoffer = $offers[2] ?? ''; @endphp @if (isset($Thirdoffer) && !empty($Thirdoffer) && $Thirdoffer !== '')
@php $singleOffersImage = app(MediaService::class)->dynamic_image($Thirdoffer->banner_image, 635); @endphp
@endif {{-- end offers section --}} {{-- Remaining Featured Sections --}} @foreach ($sections as $count_key => $row) @if ($count_key > 0) {{-- Display remaining sections --}} @if (!empty($row->product_details) && count((array) $row->product_details) > 0) @if ($row->style == 'style_1')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @if ($row->style == 'style_2')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.shop_now', 'Shop Now') }}
@endif @if ($row->style == 'style_3')
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.explore_now', 'Explore Now') }}
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @endif @endif @endforeach {{-- End Section --}} @php $categories = $categories['categories']; @endphp @if (is_array($categories) && count($categories) >= 1)
@if ($store_settings['category_section_title'] != null)

{{ is_array($category_section_title) ? $category_section_title[$language_code] ?? ($category_section_title['en'] ?? reset($category_section_title)) : $category_section_title }}

@else

{{ labels('front_messages.popular_categories', 'Popular Categories') }}

@endif

{{ labels('front_messages.explore_categories', 'Explore top picks in our Categories!') }}

@foreach ($categories as $category) @endforeach
@endif {{-- brands --}} @if (isset($brands['brands']) && is_array($brands['brands']) && count($brands['brands']) >= 1)

{{ labels('front_messages.popular_brands', 'Popular Brands') }}

{{ labels('front_messages.explore_brands', 'Explore top picks in our Brands!') }}

@foreach ($brands['brands'] as $brand) @endforeach
@endif {{-- end brands --}}