@extends('ecommerce::layout.store-layout') @php $title = static fn($value) => is_array($value) ? ($value[app()->getLocale()] ?? $value['en'] ?? reset($value)) : ($value ?: ''); $image = static fn($value) => $value ?: asset('assets/images/pro/1.jpg'); $localizedName = is_array($merchant->company_name ?? null) ? ($merchant->company_name[app()->getLocale()] ?? $merchant->company_name['en'] ?? reset($merchant->company_name)) : ($merchant->company_name ?? $merchant->name); $localizedDesc = is_array($merchant->description ?? null) ? ($merchant->description[app()->getLocale()] ?? $merchant->description['en'] ?? reset($merchant->description)) : ($merchant->description ?? ''); $merchantLogo = $merchant->logo ?: asset($platformBrand['logo']); $merchantRating = (float) ($merchant->rate ?? $merchant->rating ?? 0); $totalProducts = $products instanceof \Illuminate\Pagination\LengthAwarePaginator ? $products->total() : $products->count(); $activeStoreTab = 'products'; // Split the store's own uploads the way visitors expect to see them. $attachmentImages = ($attachments ?? collect())->filter->is_image->values(); $attachmentDocs = ($attachments ?? collect())->reject->is_image->values(); $fileSize = static function ($bytes) { $kb = round(((float) $bytes) / 1024, 0); return $kb >= 1024 ? __('ecommerce::ecommerce.file_size_mb', ['size' => number_format($kb / 1024, 1)]) : __('ecommerce::ecommerce.file_size_kb', ['size' => number_format($kb)]); }; @endphp @section('title', $localizedName) @section('active-nav', 'merchants') @section('page-styles') @endsection @section('content')

{{ $localizedName }}

@if($localizedDesc)

{{ $localizedDesc }}

@endif
{{ $totalProducts }} @lang('ecommerce::ecommerce.products_short') {{ $branches->count() }} @lang('ecommerce::ecommerce.registered_branches') @lang('ecommerce::ecommerce.store_reviews')

@lang('ecommerce::ecommerce.product_details_cta')

@lang('ecommerce::ecommerce.product_details_cta_desc')

@lang('ecommerce::ecommerce.contact_store')

@if($merchant->phone)
@lang('ecommerce::ecommerce.store_phone_label') {{ $merchant->phone }}
@endif @if($merchant->email)
@lang('ecommerce::ecommerce.store_email_label') {{ $merchant->email }}
@endif @unless($merchant->phone || $merchant->email)

@lang('ecommerce::ecommerce.store_contact_unavailable')

@endunless
{{-- Store attachments: read-only list of files the merchant uploaded. HIDDEN (commented out) - section class="attachments"

@lang('ecommerce::ecommerce.store_attachments')

@lang('ecommerce::ecommerce.store_attachments_desc')

@if($attachments->isEmpty())
@lang('ecommerce::ecommerce.store_no_attachments')
@else @if($attachmentImages->isNotEmpty())

@lang('ecommerce::ecommerce.store_attachment_images')

@foreach($attachmentImages as $file) {{ $file->display_name }} {{ $file->display_name }} @endforeach
@endif @if($attachmentDocs->isNotEmpty())

@lang('ecommerce::ecommerce.store_attachment_files')

@endif @endif
--}}
@endsection @section('scripts') @endsection