@extends('admin.layouts.grid') @section('title', $item->name) @section('item_view', true) @section('back', route('admin.items.index')) @section('content')
@include('admin.items.includes.tabs-nav')

{{ translate('Statistics') }}

@include('admin.partials.period-select', [ 'date' => $item->created_at, ])

{{ number_format($counters['total_sales']) }}

{{ translate('Total Sales') }}

{{ getAmount($counters['total_sales_amount']) }}

{{ translate('Total Sales Amount') }}

{{ getAmount($counters['total_earnings']) }}

{{ translate('Total Earnings') }}

{{ number_format($counters['total_views']) }}

{{ translate('Total Views') }}

{{ translate('Sales Statistics') }}

{{ translate('Top Purchasing Countries') }}

@forelse ($topPurchasingCountries as $topPurchasingCountry)
{{ countries($topPurchasingCountry->country) }}
{{ countries($topPurchasingCountry->country) }}
{{ getAmount($topPurchasingCountry->total_spend) }}
@empty @include('admin.partials.empty') @endforelse

{{ translate('Purchasing Countries') }}

{{ translate('Views Statistics') }}

{{ translate('Top Referrals') }}

@forelse($referrals as $referral)
{{ shorterText($referral->referrer, 60) }}
{{ numberFormat($referral->total_views) }}
@empty @include('admin.partials.empty') @endforelse
@push('top_scripts') @php $chartsConfig = [ 'sales' => $charts['sales'], 'views' => $charts['views'], 'geo' => [ 'data' => [], ], ]; $chartsConfig['geo']['data'][] = ['Country', translate('Sales')]; if (!$geoCountries->isEmpty()) { foreach ($geoCountries as $geoCountry) { $chartsConfig['geo']['data'][] = [$geoCountry->country, (int) $geoCountry->total_sales]; } } @endphp @endpush @push('scripts_libs') @endpush @endsection