@extends('backEnd.layouts.master') @section('title','Product Edit') @section('css') @endsection @section('content')

Edit Product: {{ $edit_data->name }}

@csrf
Basic Information
@error('name') {{ $message }} @enderror
@error('category_id') {{ $message }} @enderror
@error('subcategory_id') {{ $message }} @enderror
@error('childcategory_id') {{ $message }} @enderror
@error('description') {{ $message }} @enderror
@error('note') {{ $message }} @enderror
{{-- WHOLESALE PRICING TIERS --}}
Wholesale Pricing Tiers
@if($wholesalePrices && $wholesalePrices->count() > 0) @foreach($wholesalePrices as $key => $tier)
@if($loop->first) @else @endif
@endforeach @else
@endif
{{-- VARIANT PRICE CARD --}}
Product Variants (Color & Size)
@php // Group variants by color_id, then by size_id // First, group by color_id (including null colors) $groupedByColor = $edit_data->variantPrices->groupBy(function($variant) { return $variant->color_id ?? 'no_color'; }); $variantIndex = 0; @endphp @forelse($groupedByColor as $colorId => $variantsForColor) @php // Get all size IDs for this color group $sizeIds = $variantsForColor->pluck('size_id')->filter()->toArray(); $firstVariant = $variantsForColor->first(); @endphp
@if($loop->first) @else @endif
আপনি শুধু Color, শুধু Size, অথবা Color + Size উভয় add করতে পারবেন
@php $variantIndex++; @endphp @empty
আপনি শুধু Color, শুধু Size, অথবা Color + Size উভয় add করতে পারবেন
@endforelse
{{-- SEO CONFIG CARD --}}
SEO Configuration
@if(!empty($edit_data->meta_image))
Meta Image
@endif Recommended size: 1200x630px
{{-- PRICING & INVENTORY CARD --}}
Pricing & Inventory
@error('purchase_price') {{ $message }} @enderror
@error('old_price') {{ $message }} @enderror
@error('new_price') {{ $message }} @enderror
Special price for resellers. Leave empty if not applicable. @error('reseller_price') {{ $message }} @enderror
@error('stock') {{ $message }} @enderror
@error('brand_id') {{ $message }} @enderror
{{-- MEDIA CARD --}}
Media & Video
@error('image') {{ $message }} @enderror
{{-- Hidden Clone for JS --}}
@foreach($edit_data->images as $image) @endforeach
@error('pro_video') {{ $message }} @enderror
{{-- PRODUCT SETTINGS CARD --}}
Product Settings
@php $currentType = old('product_type', $edit_data->is_digital ? 'digital' : 'physical'); $isDigital = $currentType === 'digital'; @endphp
{{-- ADVANCE PAYMENT (PHYSICAL) --}}
@error('advance_amount') {{ $message }} @enderror
{{-- FREE DELIVERY --}}
Enable free delivery for this product (No shipping charge will be applied)
{{-- DIGITAL FIELDS --}}
@if($edit_data->digital_file) @endif
{{-- FLAGS & SWITCHES --}}
@endsection @section('script') {{-- Variant add/remove with Multiple Size Select --}} {{-- Product type toggle --}} @endsection