@extends('layouts.app') @section('title', 'Detail Produk') @section('content')

Detail Produk: {{ $product->name }}

Informasi produk dan varian yang terhubung.

Informasi Produk

  • Kategori {{ $product->category->name }}
  • Tipe Produk {{ $product->type === 'account' ? 'Akun (Stok Kredensial)' : 'Ebook (File)' }}
  • Urutan Tampil {{ $product->sort_order }}
  • Status @if ($product->is_active) Aktif @else Tidak Aktif @endif
  • Deskripsi

    {{ $product->description ?: 'Tidak ada deskripsi.' }}

Daftar Varian Produk

Tambah Varian
@forelse ($product->variants as $var) @empty @endforelse
Nama Varian Harga Stok Digital File / Tipe Status Aksi
{{ $var->name }}
Rp{{ number_format($var->price, 0, ',', '.') }}
@if ($var->original_price && $var->original_price > $var->price) Rp{{ number_format($var->original_price, 0, ',', '.') }} @endif
@if ($var->stock == -1) Unlimited @else {{ $var->stock }} @endif @if ($product->type === 'account') Stok Akun ({{ $var->accounts->where('is_sold', false)->count() }}) @else @if ($var->digitalFile) {{ strtoupper($var->digitalFile->delivery_type->value) }} @else Belum Ada File @endif @endif @if ($var->is_active) Aktif @else Tidak Aktif @endif
@csrf @method('DELETE')
Belum ada varian produk.
@endsection