{{-- Breadcrumb --}}
{{-- Top --}}
{{-- Images --}}
@endif
{{-- Info --}}
{{-- Tabs --}}
@php
$firstImg = null;
if(isset($images) && count($images)) $firstImg = $images[0];
elseif(!empty($product->img)) $firstImg = $product->img;
$toStorageUrl = function ($path) {
$p = ltrim((string) $path, '/');
if (!str_starts_with($p, 'http') && !str_contains($p, '/')) {
$p = 'products/' . $p;
}
if (str_starts_with((string) $path, 'http')) {
return (string) $path;
}
// Prefer Laravel public disk path
if (file_exists(storage_path('app/public/' . $p))) {
return asset('storage/' . $p);
}
// Fallback for hosts storing files directly under public/
if (file_exists(public_path($p))) {
return asset($p);
}
return asset('storage/' . $p);
};
$placeholderImage = asset('front/assets/images/emptyproducts.png');
@endphp
@if($firstImg)
@else
@endif
@php
$thumbs = [];
if(isset($images) && count($images)) $thumbs = $images;
elseif(!empty($product->img)) $thumbs = [$product->img];
@endphp
@if(count($thumbs))
@foreach($thumbs as $idx => $img)
@endforeach
{{ $product->name ?? '' }}
{{ __('vendor/products.description') }}
{{ $product->desc ?? '-' }}
{{-- Vendor mini card (optional) --}}{{ $product->provider->name ?? 'Vendor' }}
{{ $product->provider->location ?? '-' }}
{{ number_format((float)($product->price ?? 0), 0) }} {{ app()->getLocale()=='ar' ? __('products.currency_sar') : 'SAR' }}
{{ __('vendor/products.manage_images') }}
{{-- Specifications --}}
{{-- Reviews --}}
{{ __('vendor/products.spec_power') }}:
{{ $product->power ?? '-' }}
{{ __('vendor/products.spec_weight') }}:
{{ $product->weight ?? '-' }}
Registration Type:
{{ strtoupper((string)($product->registration_type ?? '-')) }}
Registration Number:
{{ $product->registration_number ?? '-' }}
Registration Expiry:
{{ optional($product->registration_expiry_date)->format('Y-m-d') ?? '-' }}
Factory Name:
{{ $product->factory_name ?? '-' }}
Factory Country:
{{ $product->factory_country ?? '-' }}
UOM:
{{ $product->uom ?? '-' }}
Product PDF:
@if($product->product_pdf)View@else-@endif
Registration Certificate:
@if($product->guarantee_file)View@else-@endif