@extends('frontend.layouts.app') @section('meta_title'){{ $shop->meta_title }}@stop @section('meta_description'){{ $shop->meta_description }}@stop @section('meta') @endsection @section('content')
@php $followed_sellers = []; if (Auth::check()) { $followed_sellers = \App\Models\FollowSeller::where('user_id', Auth::user()->id)->pluck('shop_id')->toArray(); } @endphp @if (!isset($type) || $type == 'top-selling' || $type == 'cupons') @if ($shop->top_banner)
{{ env('APP_NAME') }} offer
@endif @endif
{{ $shop->name }} @if ($shop->verification_status == 1) @else @endif
{{ renderStarRating($shop->rating) }} ({{ $shop->num_of_reviews }} {{ translate('Reviews') }})
{{ $shop->address }}
@if (!isset($type)) @php $feature_products = $shop->user->products->where('published', 1)->where('approved', 1)->where('seller_featured', 1); @endphp @if (count($feature_products) > 0) @endif
@php $coupons = \App\Models\Coupon::where('user_id', $shop->user->id)->where('start_date', '<=', strtotime(date('d-m-Y')))->where('end_date', '>=', strtotime(date('d-m-Y')))->get(); @endphp @if (count($coupons)>0)

{{ translate('Coupons') }}

@endif @if ($shop->banner_full_width_1) @foreach (explode(',',$shop->banner_full_width_1) as $key => $banner)
{{ env('APP_NAME') }} offer
@endforeach @endif @if($shop->banners_half_width)
@foreach (explode(',',$shop->banners_half_width) as $key => $banner)
{{ env('APP_NAME') }} offer
@endforeach
@endif @endif

@if (!isset($type)) {{ translate('New Arrival Products')}} @elseif ($type == 'top-selling') {{ translate('Top Selling')}} @elseif ($type == 'cupons') {{ translate('All Cupons')}} @endif

@if (!isset($type))
@endif
@php if (!isset($type)){ $products = \App\Models\Product::where('user_id', $shop->user->id)->where('published', 1)->where('approved', 1)->orderBy('created_at', 'desc')->get(); } elseif ($type == 'top-selling'){ $products = \App\Models\Product::where('user_id', $shop->user->id)->where('published', 1)->where('approved', 1)->orderBy('num_of_sale', 'desc')->paginate(24); } elseif ($type == 'cupons'){ $coupons = \App\Models\Coupon::where('user_id', $shop->user->id)->where('start_date', '<=', strtotime(date('d-m-Y')))->where('end_date', '>=', strtotime(date('d-m-Y')))->paginate(24); } @endphp @if (!isset($type))
@if ($shop->banner_full_width_2) @foreach (explode(',',$shop->banner_full_width_2) as $key => $banner)
{{ env('APP_NAME') }} offer
@endforeach @endif @elseif ($type == 'cupons')
@foreach ($coupons as $key => $coupon)
@include('frontend.partials.coupon_box',['coupon' => $coupon])
@endforeach
{{ $coupons->links() }}
@elseif ($type == 'all-products')

{{ translate('All Products') }}

@foreach ($products as $key => $product)
@include('frontend.partials.product_box_1',['product' => $product])
@endforeach
{{ $products->appends(request()->input())->links() }}
@else
@foreach ($products as $key => $product)
@include('frontend.partials.product_box_1',['product' => $product])
@endforeach
{{ $products->links() }}
@endif
@endsection @section('script') @endsection