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

Edit Produk

Perbarui informasi produk "{{ $product->name }}".

@if($errors->any())
@endif
@csrf @method('PUT')
@if($extraCountries)

Kosongkan harga negara berikut jika produk tidak dijual di sana — produk tidak akan tampil di toko negara tersebut.

@foreach($extraCountries as $code) @php $cfg = config('countries.supported')[$code]; @endphp
@endforeach
@endif
@php $selectedNames = $categories->filter(fn ($c) => in_array($c->id, $selectedCategoryIds))->pluck('name'); @endphp
@foreach($categories as $cat) @endforeach

Klik untuk tambah gambar

Bisa pilih banyak · PNG, JPG, SVG (maks. 2MB)
@php $existingImages = $product->images()->get(); @endphp @if($existingImages->count())
@foreach($existingImages as $img)
UTAMA
@endforeach
@endif
{{-- ECOMMERCE LINKS --}} @php $oldLinks = old('ecommerce_links'); $links = $oldLinks ?? $product->ecommerceLinks->toArray(); $ecomIndex = 0; @endphp

Link Ecommerce

Tambahkan link produk di marketplace. Bisa lebih dari satu.

@foreach($platforms as $key => $pf) {{ $pf['label'] }} @endforeach
@foreach($links as $link) @php $curPlatform = $link['platform'] ?? 'shopee'; @endphp
@php $ecomIndex++; @endphp @endforeach
{{-- SIZE & COLOR VARIANTS --}} @php $oldVariants = old('variants'); $variantRows = $oldVariants ?? $product->variants->toArray(); $variantIndex = 0; @endphp

Varian Ukuran & Warna

Pilih kombinasi ukuran dan warna beserta stok per kombinasi. Warna boleh dikosongkan jika produk tanpa variasi warna.

@foreach($variantRows as $variant) @php $curSizeId = (int) ($variant['size_id'] ?? 0); $curColorId = (int) ($variant['color_id'] ?? 0); @endphp
@php $variantIndex++; @endphp @endforeach

Belum ada varian. Klik "Tambah Varian" untuk menambahkan.

Batal
@endsection @push('head') @endpush @push('scripts') @endpush