@extends('layouts.frontend') @section('title', $product->meta_title ?? $product->name . ' - ' . \App\Models\Setting::get('site_name', config('app.name'))) @section('meta_description', $product->meta_description ?? Str::limit(strip_tags($product->description), 160)) @section('content')
@if($product->discount_percentage)
{{ $product->discount_percentage }}% OFF
@endif {{ $product->name }}
@if($product->gallery && $product->gallery->count() > 0) @foreach($product->gallery as $image) @endforeach @endif

{{ $product->name }}

@if($product->old_price && $product->old_price > $product->new_price) ৳{{ number_format($product->old_price, 0) }} @endif ৳{{ number_format($product->new_price, 0) }}
@php $avgRating = $product->average_rating ?? 0; $reviewCount = $product->approvedReviews->count(); @endphp
@for($i = 1; $i <= 5; $i++) @endfor
@if($reviewCount > 0) {{ number_format($avgRating, 2) }}/5 @else No ratings yet @endif See Reviews
@if($product->sku)
Product code : {{ $product->sku }}
@endif
@if($product->brand)

Brand : {{ $product->brand->name }}

@endif

Remaining Stock: {{ $product->stock }}

@if($product->stock > 0)
@endif
@if($product->stock > 0)
@csrf
@csrf
@else

এই পণ্যটি বর্তমানে স্টকে নেই

@endif
@if($phone = \App\Models\Setting::get('phone')) {{ $phone }} @endif @if($whatsapp = \App\Models\Setting::get('whatsapp')) WhatsApp @endif
Ask about this product @php $shippingCharges = \App\Models\ShippingCharge::where('status', true)->orderBy('amount')->get(); @endphp
@if($shippingCharges->count() > 0) @foreach($shippingCharges as $charge)

{{ $charge->name }} - ৳{{ number_format($charge->amount, 0) }}

@endforeach @else

ঢাকা সিটির ভিতরে ১২০ টাকা

ঢাকা সিটির বাইরে ৮০ টাকা

@endif

Details

{!! $product->description !!}

Reviews ({{ $product->approvedReviews->count() }})

@if($product->approvedReviews->count() > 0)
@foreach($product->approvedReviews as $review)
{{ substr($review->customer->name ?? 'C', 0, 1) }}
{{ $review->customer->name ?? 'Customer' }}
@for($i = 1; $i <= 5; $i++) @endfor

{{ $review->comment }}

@endforeach
@else

This product has no reviews yet. Be the first to write a review.

@endif
@if($relatedProducts->count() > 0)

Related Product

@foreach($relatedProducts as $related) @include('frontend.partials.product-card', ['product' => $related]) @endforeach
@endif
@push('scripts') @endpush @endsection