@extends('layouts.app') @section('content')

Edit Product Variation

Back to Variations
@if(session('success')) @endif @if($errors->any()) @endif
@csrf @method('PUT')
Product Information
@if($product->images && count($product->images) > 0) {{ $product->name }} @else
@endif
{{ $product->name }}

SKU: {{ $product->sku ?: 'N/A' }}

Base Price: RM {{ number_format($product->price, 2) }}

Current Variation
@if($variation->image) Variation @else
@endif
{{ $variation->variation_display }}

SKU: {{ $variation->sku }}

Current Price: RM {{ number_format($variation->final_price, 2) }} @if($variation->price_adjustment != 0) (Base {{ $variation->price_adjustment >= 0 ? '+' : '' }}RM {{ number_format($variation->price_adjustment, 2) }}) @endif

Variation Attributes
@php $index = 0; @endphp @foreach($variation->attributes as $name => $value)
@php $index++; @endphp @endforeach
Define the characteristics that make this variation unique (e.g., Size: Large, Color: Red)
Pricing & Stock
Amount to add/subtract from base price (RM {{ number_format($product->price, 2) }})
Final Price: RM {{ number_format($variation->final_price, 2) }}
@error('price_adjustment')
{{ $message }}
@enderror
@error('stock_quantity')
{{ $message }}
@enderror
Variation Image
@if($variation->image)
Current variation image
@endif
Optional. Shows a specific image for this variation. Recommended size: 500x500 pixels
@error('image')
{{ $message }}
@enderror
Preview
Variation Settings
@error('sku')
{{ $message }}
@enderror
is_active) ? 'checked' : '' }}>
Inactive variations won't be available for purchase
Lower numbers appear first
@error('sort_order')
{{ $message }}
@enderror
Variation Preview
{{ $variation->variation_display }}
Current variation display name
Back to Variations
@csrf @method('DELETE')
@endsection @push('scripts') @endpush