@extends('layouts.app') @section('title', 'Product Details - ' . $product->name) @section('page-title', $product->name) @section('breadcrumb') Dashboard Products {{ $product->name }} @endsection @section('content')
{{-- Left: Image --}}
@if($product->image_path) {{ $product->name }} @else
No Image Available
@endif
{{-- Right: Main Info --}}

{{ $product->name }}

{{ $product->category ?? 'Uncategorized' }} {{ ucfirst($product->type) }} @php $statusColors = [ 'active' => 'success', 'inactive' => 'secondary', 'hidden' => 'warning text-dark' ]; @endphp {{ ucfirst($product->status) }}
{{-- Description --}}

Description

{!! nl2br(e($product->description ?? 'No description available.')) !!}

{{-- Pricing --}}
Pricing
@if($product->pricing) @php $priceType = ucfirst($product->pricing->pricing_type); $badgeColor = match($product->pricing->pricing_type) { 'recurring' => 'primary', 'one-time' => 'info', 'free' => 'success', default => 'secondary' }; @endphp {{ $priceType }} @endif
@if($product->pricing)

Currency: {{ strtoupper($product->pricing->currency) }}

@if($product->pricing->pricing_type === 'recurring')
@foreach([ 'monthly_price' => 'Monthly', 'quarterly_price' => 'Quarterly', 'semi_annual_price' => 'Semi Annual', 'annual_price' => 'Annual', 'biennial_price' => 'Biennial', 'triennial_price' => 'Triennial', 'setup_fee' => 'Setup Fee', ] as $field => $label) @if(!empty($product->pricing->$field) && $product->pricing->$field > 0)
{{ $label }}
৳ {{ number_format($product->pricing->$field, 2) }}
@endif @endforeach
@elseif($product->pricing->pricing_type === 'one-time')

৳ {{ number_format($product->pricing->one_time_price ?? 0, 2) }}

@else

Free

@endif @else

No pricing information available.

@endif
{{-- Features --}}
Features
@if($product->features && $product->features->count())
    @foreach($product->features as $feature)
  • {{ $feature->feature }}
  • @endforeach
@else

No features listed.

@endif
{{-- Server Config - Collapsible --}} @if(strtolower($product->category) === 'hosting' && $product->server)
  • Server Group: {{ $product->server->server_group }}
  • Module: {{ $product->server->module }}
  • Disk Space: {{ $product->server->disk_space }}
  • Bandwidth: {{ $product->server->bandwidth }}
  • Email Accounts: {{ $product->server->email_accounts }}
@endif {{-- Stock Management --}}
Stock Management
@if($product->stock)

Track Stock: @if($product->stock->track_stock) Yes @else No @endif

@if($product->stock->track_stock)

Stock Quantity: {{ $product->stock->stock_quantity }}

Low Stock Threshold: {{ $product->stock->low_stock_threshold }}

Allow Backorders: @if($product->stock->allow_backorders) Yes @else No @endif

@endif @else

No stock information available.

@endif
{{-- SEO Meta - Collapsible --}}

Meta Title: {{ $product->meta_title ?? '-' }}

Meta Description: {{ $product->meta_description ?? '-' }}

URL Slug: {{ $product->url_slug }}

{{-- Created / Updated --}}

Created at: {{ $product->created_at->format('d M, Y H:i') }}

Last updated: {{ $product->updated_at->format('d M, Y H:i') }}

{{-- Back Button --}} Back to Products
@endsection @push('scripts') @endpush