@extends('layouts.desktop') @php $ogProductImage = $product->getPrimaryImage(); if ($ogProductImage && !filter_var($ogProductImage, FILTER_VALIDATE_URL)) { $ogProductImage = url($ogProductImage); } @endphp @section('meta_title', $product->name . ' - Buy Online at Gletra') @section('meta_description', Str::limit(strip_tags($product->description), 160)) @section('meta_image', $ogProductImage) @push('styles') @endpush @php $approvedReviews = $product->approvedReviews; $photoReviewCount = $approvedReviews->filter(fn($r) => $r->hasPhotos())->count(); $rating = number_format($approvedReviews->avg('rating') ?? 4.2, 1); $reviewCount = $approvedReviews->count(); $salePrice = $product->sale_price ?? $product->price; $hasDiscount = $product->sale_price && $product->price > $product->sale_price; $discountPct = $hasDiscount ? round((($product->price - $product->sale_price) / $product->price) * 100) : 0; $deliveryMsg = \App\Models\Setting::get('est_delivery_msg', 'Estimated delivery within 3-5 business days.'); $returnDays = \App\Models\Setting::get('return_policy_days', '7'); $hasGallery = $product->primary_image || $product->galleries->count() > 0; $galleryAutoplay = ui_enabled('product_gallery_autoplay', true); $galleryAutoplayDelay = (int) \App\Models\Setting::get('product_gallery_autoplay_delay', 4, 'product') * 1000; $showRelated = ui_enabled('show_related_products', true); $showRecentView = ui_enabled('show_recent_view_product', true); $carouselAutoplay = ui_enabled('related_products_autoplay', true); $carouselAutoplayDelay = (int) \App\Models\Setting::get('related_products_autoplay_delay', 4, 'product') * 1000; @endphp @section('content')
{{-- Gallery (sticky on scroll) --}} {{-- Scrollable column: info, tabs, related --}}
@if($product->category) {{ $product->category->name }} @endif

{{ $product->name }}

@if($product->short_description)

{{ $product->short_description }}

@endif
{{ $rating }} ★ {{ $reviewCount }} Ratings | SKU: {{ $product->sku ?? 'N/A' }} @if($product->brand) | Brand: {{ $product->brand->name }} @endif
₹{{ number_format($salePrice, 0) }} @if($hasDiscount) ₹{{ number_format($product->price, 0) }} {{ $discountPct }}% OFF @endif
Free delivery on orders above ₹499
Bank Offer 5% cashback on select cards
Authentic Product 100% genuine & quality checked
{{ $returnDays }}-Day Returns Hassle-free return policy
Cash on Delivery Pay when you receive
@if($product->stock_qty > 0)
@csrf @if($product->variants->count() > 0) @include('partials.product-variant-selector') @else @endif
{{ $product->stock_qty }} in stock
@auth
@csrf
@else Wishlist @endauth @if($product->vendor && $product->vendor->user_id != auth()->id()) Chat Seller @endif
@else
Currently Out of Stock
@endif {{-- Smart Shopping Advice --}}

Smart Shopping Tips

  • Read full description & ingredients before ordering
  • Check {{ $reviewCount > 0 ? $reviewCount : 'customer' }} ratings & reviews below
  • Compare MRP vs sale price — you save {{ $hasDiscount ? $discountPct . '%' : 'more on deals' }}
  • Apply coupon codes at checkout for extra off
  • {{ $returnDays }}-day easy return if not satisfied
  • Keep product packaging for smooth returns
{{-- Delivery & Service promises --}}
Fast Delivery {{ $deliveryMsg }}
Secure Checkout SSL encrypted & safe payments
24/7 Support Chat with seller or Gletra support
@if($product->vendor)
{{ $product->vendor->shop_name ?? 'Gletra Seller' }}
Sold & fulfilled by verified seller
Verified
@endif
{{-- Details Tabs --}}
Product Description
{{ $product->description ?: 'No detailed description available for this product.' }}
Technical Details
@if($hasDiscount) @endif
Product Name{{ $product->name }}
Brand{{ $product->brand ? $product->brand->name : 'Gletra Originals' }}
Category{{ $product->category ? $product->category->name : 'General' }}
SKU{{ $product->sku ?? 'N/A' }}
Availability{{ $product->stock_qty > 0 ? 'In Stock (' . $product->stock_qty . ' units)' : 'Out of Stock' }}
MRP₹{{ number_format($product->price, 0) }}
Sale Price₹{{ number_format($salePrice, 0) }}
@include('partials.review-list', ['reviews' => $approvedReviews, 'photoOnly' => false, 'listId' => 'dp-rev-all-list'])
@include('partials.review-list', ['reviews' => $approvedReviews, 'photoOnly' => true, 'listId' => 'dp-rev-photos-list'])
@include('partials.product-review-cta')
{{-- Related Products --}} @if($showRelated && $relatedProducts->count() > 0) @endif {{-- Recently Viewed --}} @if($showRecentView && auth()->check() && $recentlyViewed->count() > 0)

Recently Viewed Pick up where you left off

VIEW MORE
@foreach($recentlyViewed as $rv) @php $rvProduct = $rv->product; @endphp @if($rvProduct)
@include('partials.desktop-product-card', ['product' => $rvProduct])
@endif @endforeach
@endif
{{-- /.dp-scroll-col --}}
{{-- /.dp-page-layout --}}
@endsection @push('scripts') @include('partials.product-share') @endpush