@php $siteName = $siteSettings['site_name'] ?? 'Aura Fashion'; $metaTitle = trim((string) ($product->meta_title ?? '')); $pageTitle = $metaTitle !== '' ? $metaTitle : ($product->name.' | '.$siteName); $rawDesc = trim((string) ($product->meta_description ?? '')); if ($rawDesc === '') { $rawDesc = trim(preg_replace('/\s+/u', ' ', strip_tags((string) ($product->description ?? '')))); } $pageMetaDescription = \Illuminate\Support\Str::limit($rawDesc, 160, ''); if ($pageMetaDescription === '') { $pageMetaDescription = \Illuminate\Support\Str::limit($product->name.' — '.$siteName, 160, ''); } $kw = $product->meta_keywords; if (is_array($kw)) { $pageMetaKeywords = implode(', ', array_filter($kw)); } else { $pageMetaKeywords = trim((string) ($kw ?? '')); } $pageMetaKeywords = $pageMetaKeywords !== '' ? $pageMetaKeywords : null; $sortedImages = $product->images->sortByDesc(fn($img) => $img->is_primary ? 1 : 0)->values(); $primaryImg = $sortedImages->first(); $ogImageAbsolute = null; if ($primaryImg && filled($primaryImg->image_path)) { $ogImageAbsolute = rtrim((string) config('app.url'), '/').'/storage/'.ltrim($primaryImg->image_path, '/'); } $canonicalUrl = route('product.details', $product->slug); @endphp
@foreach($sortedImages as $index => $image)
@endforeach
@if($sortedImages->count() > 0) @else @endif
{{ __('Roll to Explore Details') }}

{{ __($product->name) }}

@php $hasDiscount = false; $discountMin = null; $discountMax = null; $regularMin = $product->min_price; $regularMax = $product->max_price; $variantsWithDiscounts = $product->variants ? $product->variants->where('discount_price', '>', 0) : collect(); if ($variantsWithDiscounts->count() > 0) { $hasDiscount = true; $discountMin = $variantsWithDiscounts->min('discount_price'); $discountMax = $variantsWithDiscounts->max('discount_price'); $regularMin = $product->variants->min('price'); $regularMax = $product->variants->max('price'); } elseif ($product->discount_price > 0 && $product->discount_price < $product->price) { $hasDiscount = true; $discountMin = $product->discount_price; $discountMax = $product->discount_price; $regularMin = $product->price; $regularMax = $product->price; } @endphp
@if(isset($hasDiscount) && $hasDiscount) @if($discountMin == $discountMax) ৳{{ number_format((float)$discountMin) }} @else ৳{{ number_format((float)$discountMin) }} - ৳{{ number_format((float)$discountMax) }} @endif @if($regularMin == $regularMax) ৳{{ number_format((float)$regularMin) }} @else ৳{{ number_format((float)$regularMin) }} - ৳{{ number_format((float)$regularMax) }} @endif @else @if($regularMin == $regularMax) ৳{{ number_format((float)$regularMin) }} @else ৳{{ number_format((float)$regularMin) }} - ৳{{ number_format((float)$regularMax) }} @endif @endif
@php $colorGroups = $product->variants->groupBy('color')->filter(fn($val, $key) => !empty($key)); $sizes = $product->variants->pluck('size')->unique()->filter(); @endphp @if($product->is_variation && $colorGroups->count() > 0)

{{ __('Color') }}

{{ __($colorGroups->keys()->first()) }}
@foreach($colorGroups as $colorName => $variants) @php $variant = $variants->first(); @endphp
@if($variant->image_path) @else
{{ substr($colorName, 0, 1) }}
@endif
@endforeach
@endif @if($product->is_variation && $sizes->count() > 0)

{{ __('Size') }}

@foreach($sizes as $size) @php $isAvailable = $product->variants->where('size', $size)->sum('stock_quantity') > 0; @endphp @endforeach
@endif @if($product->isOutOfStock())

{{ __('Out of stock') }}

@else
@endif
@if($product->fabric)
{{ __('Material') }} {{ __($product->fabric) }}
@endif
{{ __('Category') }} {{ $product->categories->pluck('name')->map(fn($n) => __($n))->implode(', ') }}
@if($product->sku)
{{ __('Reference SKU') }} {{ $product->sku }}
@endif
{{ __('Share') }}

{{ __('Product Description') }}

{!! $product->description !!}
@if($relatedProducts->count() > 0)
{{ __('Similar') }}

{{ __('RELATED PRODUCTS') }}

{{ __('See All') }}
@foreach($relatedProducts as $relProduct)
@endforeach
@endif
{{ __('Picks') }}

{{ __('YOU MIGHT ALSO LIKE') }}

@foreach($youMightAlsoLike as $ymlProduct)
@endforeach
@push('scripts') @endpush