@extends('admin.layouts.app') @section('title', 'View Product') @section('page-title', 'View Product') @section('content')

{{ $product->name }}

@if($product->featured_image || count($product->gallery_images) > 0)

Images

Featured

@if($product->featured_image) Featured @else
@endif

Gallery

@if(count($product->gallery_images) > 0)
@foreach($product->gallery_images as $image) Gallery @endforeach
@else
@endif
@endif

Product Information

Name (Khmer)
{{ $product->name_km ?? 'N/A' }}
Price
${{ number_format($product->price, 2) }}
Original Price
${{ number_format($product->original_price, 2) }}
Category
@if($product->categoryRelation) @if($product->categoryRelation->isSubcategory() && $product->categoryRelation->parent) {{ $product->categoryRelation->parent->name }} → {{ $product->categoryRelation->name }} @else {{ $product->categoryRelation->name }} @endif @else No category @endif
Status
@if($product->in_stock) In Stock @else Out of Stock @endif @if($product->on_sale) On Sale @endif
Rating
{{ $product->rating ?? 'N/A' }} ({{ $product->reviews ?? 0 }} reviews)

Description

{{ $product->description ?? 'No description' }}

Description (Khmer)

{{ $product->description_km ?? 'No description' }}

@endsection