@extends('frontend.default.layouts.app') @section('styles') @endsection @section('share_meta') @php $tags = str_replace(',', ' ',app('general_setting')->meta_tags); @endphp @endsection @section('content') @include('frontend.default.partials._mega_menu')
@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}}
@php $top_brands = $widgets->where('section_name','top_brands')->first(); @endphp
{{$top_brands->title}}
@php $top_picks = $widgets->where('section_name','top_picks')->first(); @endphp
{{$top_picks->title}}
{{ __('common.view_all') }}
@php $more_products = $widgets->where('section_name','more_products')->first(); @endphp
{{$more_products->title}}
@foreach($more_products->getHomePageProductByQuery() as $key => $product)
@if ($product->product_name) {{ textLimit(@$product->product_name, 22) }} @else {{ textLimit(@$product->product->product_name, 22) }} @endif

@if($product->hasDeal) {{single_price(selling_price($product->skus->first()->selling_price,$product->hasDeal->discount_type,$product->hasDeal->discount))}} @else @if($product->hasDiscount == 'yes') {{single_price(selling_price(@$product->skus->first()->selling_price,@$product->discount_type,@$product->discount))}} @else {{single_price(@$product->skus->first()->selling_price)}} @endif @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
@if($product->hasDeal) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount >0) @if($product->hasDeal->discount_type ==0) {{$product->hasDeal->discount}} % off @else {{single_price($product->hasDeal->discount)}} off @endif @endif @endif @else @if($product->hasDiscount == 'yes') @if($product->discount > 0) @if($product->discount >0) @if($product->discount_type ==0) {{$product->discount}} % off @else {{single_price($product->discount)}} off @endif @endif @endif @endif @endif
@endforeach
{{ __('defaultTheme.load_more') }}
@include(theme('partials._subscription_modal')) @endsection @include(theme('partials.add_to_cart_script')) @include(theme('partials.add_to_compare_script'))