@extends('frontend.layouts.user_panel') @section('panel_content')
@if (get_setting('wallet_system') == 1)

{{ translate('Wallet Balance') }}

{{ single_price(Auth::user()->balance) }}


@php $last_recharge = \App\Models\Wallet::where('user_id', Auth::user()->id)->orderBy('id', 'desc')->first(); @endphp

{{ translate('Last Recharge') }} {{ $last_recharge ? date('d.m.Y', strtotime($last_recharge->created_at)) : '' }}

{{ $last_recharge ? single_price($last_recharge->amount) : 0 }}

@endif
@php $expenditure = \App\Models\Order::where('user_id', Auth::user()->id)->where('payment_status', 'paid')->sum('grand_total'); @endphp {{ translate('Total Expenditure') }} {{ single_price($expenditure) }}
{{ translate('View Order History') }}
@if (addon_is_activated('club_point'))
@php $club_points = \App\Models\ClubPoint::where('user_id', Auth::user()->id)->where('convert_status', 0)->sum('points'); @endphp {{ translate('Total Club Points') }} {{ $club_points }}
{{ translate('Convert Club Points') }}
@endif
@php $user_id = Auth::user()->id; $cart = \App\Models\Cart::where('user_id', $user_id)->get(); @endphp {{ count($cart) > 0 ? sprintf("%02d", count($cart)) : 0 }} {{ translate('Products in Cart') }}
@php $user_id = Auth::user()->id; $cart = \App\Models\Cart::where('user_id', $user_id)->get(); @endphp {{ count(Auth::user()->wishlists) > 0 ? sprintf("%02d", count(Auth::user()->wishlists)) : 0 }} {{ translate('Products in Wishlist') }}
@php $orders = \App\Models\Order::where('user_id', Auth::user()->id)->get(); $total = 0; foreach ($orders as $key => $order) { $total += count($order->orderDetails); } @endphp {{ $total > 0 ? sprintf("%02d", $total) : 0 }} {{ translate('Total Products Ordered') }}
@if (get_setting('classified_product'))
{{ translate('Purchased Package') }}
@php $customer_package = \App\Models\CustomerPackage::find(Auth::user()->customer_package_id); @endphp @if($customer_package != null)

{{ translate('Current Package') }}: {{ $customer_package->getTranslation('name') }}

{{ translate('Product Upload') }} {{ $customer_package->product_upload }} {{ translate('Times')}}

{{ translate('Product Upload Remains') }} {{ Auth::user()->remaining_uploads }} {{ translate('Times')}}

@else {{translate('Package Not Found')}} @endif {{ translate('Upgrade Package') }}
@endif
{{ translate('Default Shipping Address') }}
@if(Auth::user()->addresses != null) @php $address = Auth::user()->addresses->where('set_default', 1)->first(); @endphp @if($address != null)
  • {{ $address->address }},
  • {{ $address->postal_code }} - {{ $address->city->name }},
  • {{ $address->state->name }},
  • {{ $address->country->name }}.
  • {{ $address->phone }}
@endif @endif

{{ translate('My Wishlist')}}

{{ translate('View All') }}
@php $wishlists = \App\Models\Wishlist::where('user_id', Auth::user()->id)->get(); @endphp @if (count($wishlists) > 0)
@foreach($wishlists->take(5) as $key => $wishlist) @if ($wishlist->product != null)
{{ $wishlist->product->getTranslation('name') }}
{{ home_discounted_base_price($wishlist->product) }} @if(home_base_price($wishlist->product) != home_discounted_base_price($wishlist->product)) {{ home_base_price($wishlist->product) }} @endif
@endif @endforeach
@else
Image
{{ translate("There isn't anything added yet")}}
@endif @endsection @section('modal') @include('frontend.partials.wallet_modal') @include('frontend.partials.address_modal') @endsection @section('script') @if (get_setting('google_map') == 1) @include('frontend.partials.google_map') @endif @endsection