@extends('frontEnd.layouts.master') @section('title', $details->name) @push('seo') @php $metaTitle = $details->meta_title ?? $details->name; $metaDescription = $details->meta_description ?? Str::limit(strip_tags($details->description), 160); $metaKeywords = $details->meta_keywords ?? $details->name; $metaImage = $details->meta_image ? asset($details->meta_image) : asset(optional($details->image)->image); @endphp @endpush @push('css') @endpush @section('content')
@if($details->old_price)

@php $discount=(((($details->old_price)-($details->new_price))*100) / ($details->old_price)) @endphp {{ number_format($discount, 0) }}%

ছাড়
@endif

{{ $details->name }}

@if ($details->old_price) ৳{{ $details->old_price }} @endif ৳{{ $details->new_price }}

@php $averageRating = $reviews->avg('ratting'); $filledStars = floor($averageRating); $emptyStars = 5 - $filledStars; @endphp @if ($averageRating >= 0 && $averageRating <= 5) @for ($i = 1; $i <= $filledStars; $i++) @endfor @if ($averageRating == $filledStars) {{-- If averageRating is an integer, don't display half star --}} @else @endif @for ($i = 1; $i <= $emptyStars; $i++) @endfor {{ number_format($averageRating, 2) }}/5 @else Invalid rating range @endif See Reviews

প্রোডাক্ট কোড : {{ $details->product_code }}

{{-- ⭐⭐ এখানে Product Type দেখানো হচ্ছে ⭐⭐ --}} @php $productTypeText = $details->is_digital ? 'Digital' : 'Physical'; @endphp

Product Type: {{ $productTypeText }}

{{-- ⭐⭐ Product Type End ⭐⭐ --}} {{-- ⭐⭐ Wholesale Pricing Tiers - Simple Clean Design ⭐⭐ --}} @if($details->is_wholesale && $details->wholesalePrices && $details->wholesalePrices->count() > 0)
Wholesale Pricing
@foreach($details->wholesalePrices->sortBy('min_quantity') as $tier) @endforeach
Quantity Price Stock
{{ $tier->min_quantity }}{{ $tier->max_quantity ? ' - ' . $tier->max_quantity : '+' }} pcs ৳{{ number_format($tier->wholesale_price, 2) }} {{ $tier->stock ?? 0 }} pcs

Quantity select করলে wholesale price automatically apply হবে

@endif {{-- ⭐⭐ Wholesale Pricing End ⭐⭐ --}}
@csrf {{-- ✅ Variant-based Color & Size (with your old design style) --}} @if ($details->variantPrices->count() > 0) @php $productcolors = $details->variantPrices->pluck('color')->unique('id')->filter(); $productsizes = $details->variantPrices->pluck('size')->unique('id')->filter(); @endphp {{-- 🎨 Color Section --}} @if ($productcolors->count() > 0)

Color -

@foreach ($productcolors as $procolor)
{{-- ✅ এখন color_id পাঠানো হচ্ছে (নাম নয়) --}}
@endforeach
@endif {{-- 📏 Size Section --}} @if ($productsizes->count() > 0)

Size & Variant -

@foreach ($productsizes as $prosize)
{{-- ✅ এখন size_id পাঠানো হচ্ছে --}}
@endforeach
@endif @endif @if ($details->pro_unit)
@endif

Brand : {{ $details->brand ? $details->brand->name : 'N/A' }}

- +
@foreach ($shippingcharge as $key => $value) {{ $value->name }}
@endforeach

বিস্তারিত

{!! $details->description !!}

Customer Reviews ({{ $reviews->count() }})

@if ($reviews->count() > 0)
@foreach ($reviews as $review)
{{ strtoupper(substr($review->name, 0, 1)) }}
{{ $review->name }}
{{ $review->created_at->format('d M Y') }}
@for ($i = 1; $i <= 5; $i++) @if ($i <= $review->ratting) @else @endif @endfor

{{ $review->review }}

@endforeach
@else

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

@endif
@if($details->pro_video)

ভিডিও

@endif
@endsection @push('script') {{-- 🔹 নতুন dataLayer + Facebook Pixel ইভেন্ট (আগের কিছু না কেটে শুধু যোগ করা) --}} @endpush