@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($brands = \App\Model\Brand::active()->take(15)->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('brands')}}
@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') }}

@php($overallRating = \App\CPU\ProductManager::get_overall_rating($deal_of_the_day->product['reviews']))
{{\Illuminate\Support\Str::limit($deal_of_the_day->product['name'],30)}}
@for($inc=0;$inc<5;$inc++) @if($inc<$overallRating[0]) @else @endif @endfor
@if($deal_of_the_day->product->discount > 0) {{\App\CPU\Helpers::currency_converter($deal_of_the_day->product->unit_price)}} @endif {{\App\CPU\Helpers::currency_converter( $deal_of_the_day->product->unit_price-(\App\CPU\Helpers::get_product_discount($deal_of_the_day->product,$deal_of_the_day->product->unit_price)) )}}
@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 --}}
{{ \App\CPU\translate('latest_products')}}
@php($latest_products = $latest_products->take(8)) @foreach($latest_products as $product)
@include('web-views.partials._single-product',['product'=>$product,'decimal_point_settings'=>$decimal_point_settings])
@endforeach
@if (isset($main_section_banner))
@endif @php($business_mode=\App\CPU\Helpers::get_business_settings('business_mode')) {{--categries--}}
{{ \App\CPU\translate('ARRIVALS')}}
{{-- 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 --}}

{{ \App\CPU\translate('Fast Delivery all accross the country')}}

{{ \App\CPU\translate('Safe Payment')}}

{{ \App\CPU\translate('7 Days Return Policy')}}

{{ \App\CPU\translate('100% Authentic Products')}}

@endsection @push('script') {{-- Owl Carousel --}} @endpush