@extends('frontend.amazy.layouts.app') @push('styles') @endpush @section('content') @php $headers = \Modules\Appearance\Entities\Header::all(); @endphp @php $best_deal = $widgets->where('section_name','best_deals')->first(); @endphp

{{$best_deal->title}}

{{ __('common.view_all') }}
@php $feature_categories = $widgets->where('section_name','feature_categories')->first(); @endphp

{{$feature_categories->title}}

{{ __('common.view_all') }}
@foreach($feature_categories->getCategoryByQuery() as $key => $category)
@if(app('general_setting')->lazyload == 1) {{@$category->name}} @else {{@$category->name}} @endif

{{textLimit($category->name,25)}}

{{getNumberTranslate($category->sellerProducts->count())}} {{__('common.products')}}

{{__('common.shop_now')}} ยป
@endforeach
@php $filter_category_1 = $widgets->where('section_name','filter_category_1')->first(); $category = @$filter_category_1->customSection->category; @endphp
@if($category)

{{$filter_category_1->title}}

{{__('common.more_deals')}}
{{@$filter_category_1->title}}
@if($category->subCategories->count()) @foreach($category->subCategories as $key => $subcat)
@foreach($subcat->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endforeach @else
@foreach($category->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endif
@endif
@php $filter_category_2 = $widgets->where('section_name','filter_category_2')->first(); $category = @$filter_category_2->customSection->category; @endphp
@if($category)

{{$filter_category_2->title}}

{{__('common.more_deals')}}
{{@$filter_category_2->title}}
@if($category->subCategories->count()) @foreach($category->subCategories as $key => $subcat)
@foreach($subcat->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endforeach @else
@foreach($category->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endif
@endif
@php $filter_category_3 = $widgets->where('section_name','filter_category_3')->first(); $category = @$filter_category_3->customSection->category; @endphp
@if($category)

{{$filter_category_3->title}}

{{__('common.more_deals')}}
{{@$filter_category_3->title}}
@if($category->subCategories->count()) @foreach($category->subCategories as $key => $subcat)
@foreach($subcat->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endforeach @else
@foreach($category->sellerProductTake() as $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices->count()) {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@endif
@endif
@php $top_rating = $widgets->where('section_name','top_rating')->first(); $peoples_choice = $widgets->where('section_name','people_choices')->first(); $top_picks = $widgets->where('section_name','top_picks')->first(); @endphp
@php $discount_banner = $widgets->where('section_name','discount_banner')->first(); @endphp
@php $more_products = $widgets->where('section_name','more_products')->first(); @endphp

{{$more_products->title}}

@foreach($more_products->getHomePageProductByQuery() as $key => $product)
@php if (@$product->thum_img != null) { $thumbnail = showImage(@$product->thum_img); } else { $thumbnail = showImage(@$product->product->thumbnail_image_source); } $price_qty = getProductDiscountedPrice(@$product); $showData = [ 'name' => @$product->product_name, 'url' => singleProductURL(@$product->seller->slug, @$product->slug), 'price' => $price_qty, 'thumbnail' => $thumbnail, ]; @endphp @if(app('general_setting')->lazyload == 1) {{ @$product->product_name }} @else {{ @$product->product_name }} @endif @if(isGuestAddtoCart()) @endif
@if(isGuestAddtoCart()) @if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{getNumberTranslate($product->hasDeal->discount)}} % {{__('common.off')}} @else {{single_price($product->hasDeal->discount)}} {{__('common.off')}} @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount >0) @if($product->discount_type ==0) {{getNumberTranslate($product->discount)}} % {{__('common.off')}} @else {{single_price($product->discount)}} {{__('common.off')}} @endif @endif @endif @endif @endif @if(isModuleActive('ClubPoint')) {{getNumberTranslate(@$product->product->club_point)}} @endif @if(isModuleActive('WholeSale') && @$product->skus->first()->wholeSalePrices != '') {{__('common.wholesale')}} @endif
@php $reviews = @$product->reviews->where('status', 1)->pluck('rating'); if (count($reviews) > 0) { $value = 0; $rating = 0; foreach ($reviews as $review) { $value += $review; } $rating = $value / count($reviews); $total_review = count($reviews); } else { $rating = 0; $total_review = 0; } @endphp
@endforeach
@if($more_products->getHomePageProductByQuery()->lastPage() > 1) {{__('common.load_more')}} @endif
@include(theme('partials._subscription_modal')) @endsection @include(theme('partials.add_to_cart_script')) @include(theme('partials.add_to_compare_script'))