@extends('themes.organic.layouts.master') @section('title', $product->meta_title ?? $product->name) @php $activeVariants = ($product->variants ?? collect())->where('status', 1)->values(); $hasVariants = $activeVariants->isNotEmpty(); $displayStock = $hasVariants ? (int) $activeVariants->sum('stock') : (int) $product->stock; $currentPrice = $product->effective_price; $hasDiscount = $product->sale_price && $product->sale_price < $product->price; $phone = trim((string) ($setting->phone ?? '')); $shareUrl = url()->current(); $phoneDial = \App\Support\BangladeshPhone::toTelUri($phone) ?: ''; $phoneWaUrl = wa_me_url($phone, 'আমি ' . $product->name . ' সম্পর্কে জানতে চাই। ' . $shareUrl); $galleryImages = collect(); if ($product->thumbnail) { $galleryImages->push((object) [ 'src' => asset($product->thumbnail), 'alt' => $product->thumbnailAlt(), ]); } foreach ($product->images as $img) { $galleryImages->push((object) [ 'src' => asset($img->image), 'alt' => $img->effectiveAlt($product->name), ]); } if ($galleryImages->isEmpty()) { $galleryImages->push((object) ['src' => '', 'alt' => $product->name]); } @endphp @push('styles') @endpush @section('content')
{{-- Gallery --}}
@if($galleryImages->count() > 1) @endif
{{-- Product info --}}

{{ $product->name }}

@if($product->brand)

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

@endif
Availability: {{ $displayStock > 0 ? 'In Stock' : 'Out of Stock' }}
@include('themes.shared.product-variant-picker', ['product' => $product])
@if($hasDiscount)
{{ number_format($product->price, 0) }}
@endif
{{ number_format($currentPrice, 0) }}
৳{{ number_format($currentPrice, 0) }}

Quantity

@if($phoneDial) @endif @if(!empty($showShippingTable) && !empty($shippingRatesTable))
@foreach($shippingRatesTable as $row) @endforeach
Area Delivery Charge Times
{{ $row['area'] }} @if($product->is_freeshipping) Free @else ৳{{ number_format($row['charge'], 0) }} @endif {{ $row['time'] ?: '—' }}
@elseif($product->is_freeshipping)
Free Delivery — এই product-এ free shipping আছে।
@endif
{{-- Sidebar short description (desktop) --}} @if($product->short_description)
{!! nl2br(e($product->short_description)) !!}
@endif
{{-- Description / Reviews tabs --}} @if($product->description || $product->reviews->count() > 0)
@if($product->description) @endif @if($product->reviews->count() > 0) @endif
@if($product->description)
{!! $product->description !!}
@endif @if($product->reviews->count() > 0)
@foreach($product->reviews as $review)
{{ $review->reviewer_name }}
@for($i=1;$i<=5;$i++)@endfor

{{ $review->comment }}

@endforeach
@endif
@endif {{-- Related products --}} @if(isset($related) && $related->isNotEmpty()) @endif
@endsection @push('scripts') @endpush