{{-- resources/views/public/product-page.blade.php --}} @php // Get theme fonts from active preset $headingFont = 'Inter'; $bodyFont = 'Inter'; if ($website && $website->activeTheme && $website->activeTheme->theme) { $defaultPreset = $website->activeTheme->theme->presets()->where('is_default', true)->first(); if ($defaultPreset && isset($defaultPreset->font_scheme)) { $headingFont = $defaultPreset->font_scheme['heading'] ?? 'Inter'; $bodyFont = $defaultPreset->font_scheme['body'] ?? 'Inter'; } } // Build Google Fonts URL dynamically $fontsToLoad = []; if ($headingFont !== 'Default') { $fontsToLoad[] = str_replace(' ', '+', $headingFont) . ':wght@300;400;500;600;700;800;900'; } if ($bodyFont !== 'Default' && $bodyFont !== $headingFont) { $fontsToLoad[] = str_replace(' ', '+', $bodyFont) . ':wght@300;400;500;600;700;800;900'; } $googleFontsUrl = 'https://fonts.googleapis.com/css2?family=' . implode('&family=', $fontsToLoad) . '&display=swap'; @endphp @if($product->meta_keywords) @endif {{ $product->seo_title ?? $product->name }} - {{ $website->name }} @if($website->theme) @endif @if(count($fontsToLoad) > 0) @endif @if($product->main_image) @endif @if($product->main_image) @endif @if($website->menus->count() > 0) @php $mainMenu = $website->menus->where('location', 'main')->first() ?? $website->menus->first(); @endphp @if($mainMenu && $mainMenu->items->count() > 0) @endif @endif

{{ $product->name }}

@if($product->sku)

SKU: {{ $product->sku }}

@endif
@if($product->categories->count() > 0)
@foreach($product->categories as $category) {{ $category->name }} @endforeach
@endif
@if($product->sale_price)
{{ $website->getCurrencySymbol() }} {{ number_format($product->sale_price, 2) }} {{ $website->getCurrencySymbol() }} {{ number_format($product->price, 2) }} Save {{ number_format((($product->price - $product->sale_price) / $product->price) * 100, 0) }}%
@else @if($product->has_variations) {{ $website->getCurrencySymbol() }} {{ number_format($product->min_price, 2) }} - {{ $website->getCurrencySymbol() }} {{ number_format($product->max_price, 2) }} @else {{ $website->getCurrencySymbol() }} {{ number_format($product->price, 2) }} @endif @endif
@if($product->in_stock) In Stock ({{ $product->total_stock }} units available) @else Out of Stock @endif
@if($product->description)
Description

{{ $product->description }}

@endif @if($product->has_variations && $product->variations->count() > 0)
Available Options
@foreach($product->variations as $variation)
{{ $variation->variation_display }}
@if($variation->stock_quantity > 0) {{ $variation->stock_quantity }} in stock @else Out of stock @endif
{{ $website->getCurrencySymbol() }} {{ number_format($variation->final_price, 2) }}
@if($variation->price_adjustment != 0) ({{ $variation->price_adjustment >= 0 ? '+' : '' }}{{ $website->getCurrencySymbol() }} {{ number_format($variation->price_adjustment, 2) }}) @endif
@endforeach
@endif @if($product->weight || $product->dimensions)
Product Details
    @if($product->weight)
  • Weight: {{ $product->weight }} kg
  • @endif @if($product->dimensions)
  • Dimensions: {{ $product->dimensions['length'] ?? '' }}cm × {{ $product->dimensions['width'] ?? '' }}cm × {{ $product->dimensions['height'] ?? '' }}cm
  • @endif
@endif @if($product->in_stock)
@csrf @if($product->has_variations && $product->variations->count() > 0)
@endif
@else
This product is currently out of stock.
@endif

Free Shipping

Secure Payment

Easy Returns

@if(isset($relatedProducts) && $relatedProducts->count() > 0)

Related Products

@foreach($relatedProducts as $relatedProduct)
@if($relatedProduct->main_image) {{ $relatedProduct->name }} @else @endif
{{ $relatedProduct->name }}

{{ Str::limit($relatedProduct->description, 80) }}

@if($relatedProduct->sale_price) {{ $website->getCurrencySymbol() }} {{ number_format($relatedProduct->sale_price, 2) }} @else {{ $website->getCurrencySymbol() }} {{ number_format($relatedProduct->price, 2) }} @endif
View
@endforeach
@endif
@if($website->settings['google_analytics'] ?? false) @endif