@extends('layouts.front-end.app') @section('title', $web_config['name']->value.' '.\App\CPU\translate('Online Shopping').' | '.$web_config['name']->value.' '.\App\CPU\translate(' Ecommerce')) @push('css_or_js') @endpush @section('content') @php($categories = \App\Model\Category::with('childes.childes')->where(['position' => 0])->priority()->take(11)->get()) @php($spacialCategories = \App\Model\SpacialCategory::where(['position' => 0])->take(11)->get())
@php($decimal_point_settings = !empty(\App\CPU\Helpers::get_business_settings('decimal_point_settings')) ? \App\CPU\Helpers::get_business_settings('decimal_point_settings') : 0)
@include('web-views.partials._home-top-slider',['main_banner'=>$main_banner])
{{--flash deal--}} @if ($web_config['flash_deals'])
@if (count($web_config['flash_deals']->products)>0) {{ \App\CPU\translate('view_all')}} @endif
{{ \App\CPU\translate('flash deal')}}
{{ \App\CPU\translate('day')}} : {{ \App\CPU\translate('hrs')}} : {{ \App\CPU\translate('min')}} : {{ \App\CPU\translate('sec')}}
@endif {{--brands--}} @if($web_config['brand_setting'])
{{\App\CPU\translate('Categories')}}
@endif @if ($featured_products->count() > 0 )
{{ \App\CPU\translate('featured_products')}}
@endif {{--featured deal--}} @if($web_config['featured_deals']) @endif {{--deal of the day--}}
{{-- Deal of the day/Recommended Product --}}
@if(isset($deal_of_the_day) && isset($deal_of_the_day->product))

{{ \App\CPU\translate('deal_of_the_day') }}

@else @php($product=\App\Model\Product::active()->inRandomOrder()->first()) @if(isset($product))

{{ \App\CPU\translate('recommended_product') }}

@php($overallRating = \App\CPU\ProductManager::get_overall_rating($product['reviews']))
{{\Illuminate\Support\Str::limit($product['name'],40)}}
@for($inc=0;$inc<5;$inc++) @if($inc<$overallRating[0]) @else @endif @endfor
@if($product->discount > 0) {{\App\CPU\Helpers::currency_converter($product->unit_price)}} @endif {{\App\CPU\Helpers::currency_converter( $product->unit_price-(\App\CPU\Helpers::get_product_discount($product,$product->unit_price)) )}}
@endif @endif
{{-- Latest products --}}
@foreach($latest_products as $latest_single_product) @php($product = \App\Model\Product::where(['id' => $latest_single_product->product_id])->first())
@include('web-views.partials._single-product',['product'=>$product,'decimal_point_settings'=>$decimal_point_settings])
@endforeach
@if (isset($main_section_banner))
@foreach($main_section_banner as $bannerImg) @endforeach
@endif @php($business_mode=\App\CPU\Helpers::get_business_settings('business_mode')) {{--categries--}}
{{ \App\CPU\translate('ARRIVALS')}}
Special products
@if(count($topRated)> 0) @foreach($topRated as $key=>$top) @if($top->product && $key<3) @if($top->product->discount > 0)
@if ($top->product->discount_type == 'percent') {{round($top->product->discount)}}% @elseif($top->product->discount_type =='flat') {{\App\CPU\Helpers::currency_converter($top->product->discount)}} @endif {{\App\CPU\translate('off')}}
@endif
Product
{{\Illuminate\Support\Str::limit($top->product['name'],100)}}
@php($top_overallRating = \App\CPU\ProductManager::get_overall_rating($top->product['reviews']))
@for($inc=0;$inc<5;$inc++) @if($inc<$top_overallRating[0]) @else @endif @endfor
@if($top->product->discount > 0) {{\App\CPU\Helpers::currency_converter($top->product->unit_price)}} @endif
{{\App\CPU\Helpers::currency_converter( $top->product->unit_price-(\App\CPU\Helpers::get_product_discount($top->product,$top->product->unit_price)) )}}
@endif @endforeach @endif @php($spacialProducts = \App\Model\SpacialProduct::all()) @if(count($spacialProducts)>0) @foreach($spacialProducts as $key=>$productRow) @php($top = \App\Model\Product::where('id', $productRow->product_id)->first()) @if($top->discount > 0)
@if ($top->discount_type == 'percent') {{round($top->discount)}}% @elseif($top->discount_type =='flat') {{\App\CPU\Helpers::currency_converter($top->discount)}} @endif {{\App\CPU\translate('off')}}
@endif
Product
{{\Illuminate\Support\Str::limit($top['name'],100)}}
@php($top_overallRating = \App\CPU\ProductManager::get_overall_rating($top['reviews']))
@for($inc=0;$inc<5;$inc++) @if($inc<$top_overallRating[0]) @else @endif @endfor
@if($top->discount > 0) {{\App\CPU\Helpers::currency_converter($top->unit_price)}} @endif
{{\App\CPU\Helpers::currency_converter( $top->unit_price-(\App\CPU\Helpers::get_product_discount($top,$top->unit_price)) )}}
@endforeach @endif
{{-- Banner --}}
@foreach(\App\Model\Banner::where('banner_type','Footer Banner')->where('published',1)->orderBy('id','desc')->take(2)->get() as $banner) @endforeach
{{-- Categorized product --}} @foreach($home_categories as $category)
{{Str::limit($category['name'],18)}}
@foreach($category['products'] as $key=>$product) @if ($key<4)
@include('web-views.partials._category-single-product',['product'=>$product,'decimal_point_settings'=>$decimal_point_settings])
@endif @endforeach
@endforeach {{--delivery type --}}
@endsection @push('script') {{-- Owl Carousel --}} @endpush