@extends('Admin.layout') @section('content')
{{-- PAGE HEADER --}}
Edit Product
{{-- PRODUCT FORM --}}
@csrf {{-- BASIC DETAILS AND IMAGES --}}
Basic Information
{{-- CATEGORY --}}
@error('category_id') {{ $message }} @enderror
{{-- PRODUCT ID --}}
@error('product_id') {{ $message }} @enderror
{{-- PRODUCT NAME --}}
@error('product_name') {{ $message }} @enderror
{{-- TAX --}}
@error('tax') {{ $message }} @enderror
{{-- DISCOUNT --}}
@error('discount') {{ $message }} @enderror
{{-- DESCRIPTION --}}
@error('description') {{ $message }} @enderror
{{-- PRODUCT IMAGES --}}
@error('images') {{ $message }} @enderror @error('images.*') {{ $message }} @enderror Maximum 10 images | 5 MB each
JPG, JPEG, PNG, WEBP

{{-- SAREE DETAILS --}}
Saree Details

Enter the saree and blouse piece lengths.

Meters
@error('saree_length') {{ $message }} @enderror
Meters
@error('blouse_length') {{ $message }} @enderror
@error('saree_mrp') {{ $message }} @enderror
@error('saree_selling_price') {{ $message }} @enderror
@error('saree_stock') {{ $message }} @enderror
@error('saree_shipping_charges') {{ $message }} @enderror
@php $variants = old('variants', $product->variants ?? []); if (!is_array($variants)) { $variants = []; } if (empty($variants)) { $variants = [['size' => '', 'mrp' => '', 'price' => '', 'stock' => '', 'shipping_charges' => '']]; } @endphp {{-- SIZE VARIANTS AND PRICING --}}
Size Variants & Pricing
Add a separate price and stock quantity for every available size.
Total variants: {{ count($variants) }}
@foreach ($variants as $index => $variant) @php if (!is_array($variant)) { $variant = []; } @endphp @endforeach
Size / Variant MRP (₹) Selling Price (₹) Stock Shipping Charges (₹) Action
Examples: XS, S, M, L, XL, XXL or 28, 30, 32, 34.
@error('variants') {{ $message }} @enderror @foreach ($errors->getMessages() as $field => $messages) @if (str_starts_with($field, 'variants.')) {{ $messages[0] }} @endif @endforeach

{{-- ADDITIONAL PRODUCT DETAILS --}}
Product Details
@error('material') {{ $message }} @enderror
@error('product_type') {{ $message }} @enderror
{{-- COLOUR VARIANTS --}}

Add each available colour and its images.

@foreach ($errors->getMessages() as $field => $messages) @if (str_starts_with($field, 'colors.')) {{ $messages[0] }} @endif @endforeach

{{-- PRODUCT FEATURES --}}
Product Features
is_featured) ? 'checked' : '' }}>
is_new_arrival) ? 'checked' : '' }}>
is_best_seller) ? 'checked' : '' }}>
{{-- SUBMIT --}}
@if (auth('web')->user()?->hasPermission('products', 'edit')) @endif
@endsection