@lang('shop::app.customers.account.profile.index.title') @if ((core()->getConfigData('general.general.breadcrumbs.shop'))) @section('breadcrumbs') @endSection @endif

@lang('shop::app.customers.account.profile.index.title')

{!! view_render_event('bagisto.shop.customers.account.profile.edit_button.before') !!} @lang('shop::app.customers.account.profile.index.edit') {!! view_render_event('bagisto.shop.customers.account.profile.edit_button.after') !!}
@php // Get authenticated customer $customer = auth()->guard('customer')->user(); // Ensure $errors is available for form validation if (!isset($errors)) { $errors = session()->get('errors', app('Illuminate\Support\ViewErrorBag')); } // Get marketplace seller information if customer is a seller $seller = null; $marketplaceStats = null; if (auth()->guard('customer')->check()) { try { $seller = \Webkul\Marketplace\Models\Seller::where('customer_id', auth()->guard('customer')->id())->first(); if ($seller) { // Get marketplace statistics $totalProducts = \Webkul\Marketplace\Models\Product::where('marketplace_seller_id', $seller->id)->count(); $totalSales = \Webkul\Sales\Models\OrderItem::whereHas('product', function($query) use ($seller) { $query->where('marketplace_seller_id', $seller->id); })->count(); $averageRating = 4.8; // TODO: Calculate actual rating $marketplaceStats = [ 'total_products' => $totalProducts, 'total_sales' => $totalSales, 'average_rating' => $averageRating, ]; } } catch (\Exception $e) { // Handle case where marketplace package might not be available } } @endphp @if($seller && $marketplaceStats)
@if($customer->image_url) {{ $customer->first_name }} {{ $customer->last_name }} @else
{{ strtoupper(substr($customer->first_name, 0, 1)) }}{{ strtoupper(substr($customer->last_name, 0, 1)) }}
@endif

{{ $customer->first_name }} {{ $customer->last_name }}

@if($seller->shop_title)

{{ $seller->shop_title }}

@endif @if($seller->city || $seller->state)

{{ $seller->city }}@if($seller->city && $seller->state), @endif{{ $seller->state }}

@endif
{{ number_format($marketplaceStats['average_rating'], 1) }}
Joined {{ $seller->created_at->format('M Y') }}
{{ number_format($marketplaceStats['total_products']) }}
Products Listed
{{ number_format($marketplaceStats['total_sales']) }}
Sales Made
@endif
{!! view_render_event('bagisto.shop.customers.account.profile.first_name.before') !!}

@lang('shop::app.customers.account.profile.index.first-name')

{{ $customer->first_name }}

{!! view_render_event('bagisto.shop.customers.account.profile.first_name.after') !!} {!! view_render_event('bagisto.shop.customers.account.profile.last_name.before') !!}

@lang('shop::app.customers.account.profile.index.last-name')

{{ $customer->last_name }}

{!! view_render_event('bagisto.shop.customers.account.profile.last_name.after') !!} {!! view_render_event('bagisto.shop.customers.account.profile.gender.before') !!}

@lang('shop::app.customers.account.profile.index.gender')

{{ $customer->gender ?? '-'}}

{!! view_render_event('bagisto.shop.customers.account.profile.gender.after') !!} {!! view_render_event('bagisto.shop.customers.account.profile.date_of_birth.before') !!}

@lang('shop::app.customers.account.profile.index.dob')

{{ $customer->date_of_birth ?? '-' }}

{!! view_render_event('bagisto.shop.customers.account.profile.date_of_birth.after') !!} {!! view_render_event('bagisto.shop.customers.account.profile.email.before') !!}

@lang('shop::app.customers.account.profile.index.email')

{{ $customer->email }}

{!! view_render_event('bagisto.shop.customers.account.profile.email.after') !!} {!! view_render_event('bagisto.shop.customers.account.profile.delete.before') !!}
@lang('shop::app.customers.account.profile.index.delete-profile')
@lang('shop::app.customers.account.profile.index.delete-profile')

@lang('shop::app.customers.account.profile.index.enter-password')

{!! view_render_event('bagisto.shop.customers.account.profile.delete.after') !!}