@extends('layouts.app')
@section('title', $product['name'])
@section('description', \Illuminate\Support\Str::limit($product['desc'] ?: $product['name'], 155))
@section('content')
@php
$plus = ' ';
$stars = fn ($n) => str_repeat('★', (int) round($n)) . str_repeat('☆', 5 - (int) round($n));
$firstCat = $product['cats'][0] ?? null;
$shareUrl = urlencode(url()->current());
$shareText = urlencode($product['name']);
$desc = trim((string) ($product['longDesc'] ?: $product['desc']));
@endphp
{{-- gallery: big image + a row of thumbnails --}}
@if ($product['image'])
@endif
Sale
@if (count($product['images']) > 1)
@foreach ($product['images'] as $i => $img)
@endforeach
@endif
{{-- details --}}
Home /
@if ($firstCat){{ $categoryNames[$firstCat] ?? $firstCat }} / @endif
{{ \Illuminate\Support\Str::limit($product['name'], 40) }}
SKU: {{ $product['sku'] }}
@if ($reviews['count'])
{!! $stars($reviews['avg']) !!} ({{ $reviews['count'] }})
@endif
{{ $product['name'] }}
@if (collect($product['options'])->contains(fn ($o) => stripos($o['name'], 'size') !== false))
Size Chart
@endif
Quantity
Buy it now
Product description {!! $plus !!}
@if ($desc !== '')
@foreach (preg_split('/\n{2,}/', $desc) as $para)
{{ trim($para) }}
@endforeach
@else
Details for this product will be added soon.
@endif
Delivery policy {!! $plus !!}
Orders ship within 5 to 10 business days. Standard delivery is free on selected orders; you will receive a tracking link by email as soon as your parcel leaves us.
Returns & exchanges {!! $plus !!}
Not completely happy? Return unworn items in their original packaging within {{ $company->return_days ?: 30 }} days of delivery for an exchange or refund.
{{-- customer reviews --}}
@if ($reviews['count'])
Customer Reviews
{{ number_format($reviews['avg'], 1) }}
{!! $stars($reviews['avg']) !!}
{{ $reviews['count'] }} {{ \Illuminate\Support\Str::plural('review', $reviews['count']) }}
@foreach ($reviews['dist'] as $s => $n)
@php $pct = $reviews['count'] ? round($n / $reviews['count'] * 100) : 0; @endphp
{{ $s }}★ {{ $pct }}%
@endforeach
@forelse ($reviews['items'] as $r)
{{ mb_strtoupper(mb_substr($r['author'], 0, 1)) }} {{ $r['author'] }} Review on {{ $r['date'] }}
{!! $stars($r['rating']) !!}
{{ $r['text'] }}
@empty
{{ $reviews['count'] }} {{ \Illuminate\Support\Str::plural('customer', $reviews['count']) }} rated this product. Written reviews will appear here.
@endforelse
@endif
{{-- why choose us --}}
@if ($photoWhy)
@endif
Why Choose Us?
We believe you get out what you put in — that is why everything at {{ $company->name }} is made to the highest standards of quality.
Premium quality
Every piece is checked by hand before it is packed, so what reaches you looks and feels exactly as it should.
Trust & transparency
Clear details, honest prices and {{ $company->return_days ?: 30 }} days easy returns, so you can order with confidence.
{{-- related products --}}
@if (count($related))
@endif
{{-- questions --}}
@include('partials.faq-block')
{{ \Illuminate\Support\Str::limit($product['name'], 34) }}
Add to cart
@endsection
@push('scripts')
@endpush