@php // Ensure variables are defined for the partials if(isset($categories_list)) { $all_categories = $categories_list->where('featured',1); $parents = $all_categories->whereNull('parent_id')->pluck('id')->toArray(); } @endphp @extends('ecommerce::frontend.layout.main2') @section('title') {{ $ecommerce_setting->site_title ?? 'Amna-G-Damiani - Luxury Fashion & Accessories' }} @endsection @section('description') {{ $ecommerce_setting->site_description ?? 'Discover luxury fashion and accessories at Amna-G-Damiani. Shop the latest collections of designer clothing, bags, and accessories.' }} @endsection @section('content') @include('ecommerce::frontend.partials.header')
Fashion
{{-- FIXED: Make banner text dynamic --}}
{{ $ecommerce_setting->banner_text ?? 'Up to 50% off Amazing Products' }}
Shop
@if(isset($sliders) && $sliders->count() > 0)
@foreach($sliders as $key=>$slider)
{{ $slider->title ?? 'Slider' }}

{{ $slider->title ?? 'Modern & Minimalistic' }}

{{ $slider->description ?? 'Discover our amazing collection of products designed for you.' }}

@endforeach
@endif
@php // FIXED: Make marquee text dynamic from database $marqueeText = $ecommerce_setting->marquee_text ?? 'Minimalism Style,Accessories Design,Trend Vintage,Layering,Elegance Trend,Minimalism'; $marqueeItems = array_filter(array_map('trim', explode(',', $marqueeText))); @endphp
@foreach($marqueeItems as $index => $item)

{{ $item }}

@endforeach
@foreach(array_reverse($marqueeItems) as $index => $item)

{{ $item }}

@endforeach

{{ $ecommerce_setting->category_title ?? 'Shop by Category' }}

@if(isset($all_categories)) @foreach($all_categories as $category) @if(in_array($category->id, $parents))
@if(isset($category->icon)) {{ $category->name }} @elseif(isset($category->image)) {{ $category->name }} @else Default Category @endif

{{ $category->name }}

@php $product_count = DB::table('products')->where('category_id', $category->id)->where('is_active', 1)->count(); @endphp

{{ $product_count }} products

Shop now
@endif @endforeach @endif
All Categories

{{ $ecommerce_setting->new_arrivals_title ?? 'New Arrivals' }}

@php $best_seller_products = DB::table('products') ->where('is_active', 1) ->where('is_online', 1) ->whereNotNull('image') ->where('image', '!=', '') ->where('image', '!=', 'zummXD2dvAtI.png') ->orderBy('created_at', 'desc') ->limit(8) ->get(); @endphp @foreach($best_seller_products as $product)
{{ $product->name }}
@if($product->promotion_price) {{ $currency->symbol ?? $currency->code }}{{ number_format($product->price, 2) }} {{ $currency->symbol ?? $currency->code }}{{ number_format($product->promotion_price, 2) }} @else {{ $currency->symbol ?? $currency->code }}{{ number_format($product->price, 2) }} @endif
@endforeach
@php $on_sale_products = DB::table('products') ->where('is_active', 1) ->where('is_online', 1) ->whereNotNull('promotion_price') ->limit(8) ->get(); @endphp @foreach($on_sale_products as $product)
{{ $product->name }}
@if($product->promotion_price) {{ $currency->symbol ?? $currency->code }}{{ number_format($product->price, 2) }} {{ $currency->symbol ?? $currency->code }}{{ number_format($product->promotion_price, 2) }} @else {{ $currency->symbol ?? $currency->code }}{{ number_format($product->price, 2) }} @endif
@endforeach
{{-- REMOVED: "Our Collection" section with Lorem ipsum dummy text --}} {{-- This should be made dynamic from collections table or removed --}} @if(isset($widgets) && $widgets->count() > 0) @foreach($widgets as $widget) @if($widget->name == 'category-slider-widget') @include('ecommerce::frontend.includes.category-slider-widget') @endif @if($widget->name == 'brand-slider-widget') @include('ecommerce::frontend.includes.brand-slider-widget') @endif @if($widget->name == 'product-category-widget') @include('ecommerce::frontend.includes.product-category-widget') @endif @if($widget->name == 'product-collection-widget') @include('ecommerce::frontend.includes.product-collection-widget') @endif @if($widget->name == 'text-widget') @include('ecommerce::frontend.includes.text-widget') @endif @if($widget->name == 'tab-product-category-widget') @include('ecommerce::frontend.includes.tab-product-category-widget') @endif @if($widget->name == 'tab-product-collection-widget') @include('ecommerce::frontend.includes.tab-product-collection-widget') @endif @endforeach @endif
@php // FIXED: Make feature boxes dynamic $features = [ [ 'icon' => 'icon-package', 'title' => $ecommerce_setting->feature_1_title ?? '30 days return', 'text' => $ecommerce_setting->feature_1_text ?? '30 day money back guarantee' ], [ 'icon' => 'icon-calender', 'title' => $ecommerce_setting->feature_2_title ?? '3 year warranty', 'text' => $ecommerce_setting->feature_2_text ?? 'Manufacturer\'s defect' ], [ 'icon' => 'icon-boat', 'title' => $ecommerce_setting->feature_3_title ?? 'Free shipping', 'text' => $ecommerce_setting->feature_3_text ?? 'Free Shipping for orders over ' . ($currency->symbol ?? '') . number_format($ecommerce_setting->free_shipping_from ?? 4000, 0) ], [ 'icon' => 'icon-headset', 'title' => $ecommerce_setting->feature_4_title ?? 'Online support', 'text' => $ecommerce_setting->feature_4_text ?? '24 hours a day, 7 days a week' ], ]; @endphp @foreach($features as $index => $feature)

{{ $feature['title'] }}

{{ $feature['text'] }}

@endforeach
@endsection @section('script') @endsection