@extends('layout.admin.master') @section('meta-title', 'LEREVE - Update Product') @section('body-class', 'menu-position-side menu-side-left full-screen with-content-panel') @section('breadcrumbs') @endsection @push('asset-top') @endpush @section('content')
Product
@csrf
Update
@error('name_en') @enderror
@error('name_ar') @enderror
@error('description_en') @enderror
@error('description_ar') @enderror
@error('location') @enderror
preparation_time) @else style="display:none;" @endif>
@error('preparation_time') @enderror
show_addon) style="display:block;" @endif> Addons @if($addons) @php $vals = ($product->addon_val!='null')?json_decode($product->addon_val, true):[]; @endphp
@foreach($addons as $addon)
@endforeach @endif @error('addon_val') @enderror
show_variation) style="display:block;" @endif> Variations @if($variations) @php $proVar = ($product->variation!=null) ? json_decode($product->variation, true):[]; if($proVar==null){ $proVar = []; } @endphp
@foreach($variations as $variation)
@endforeach
@endif @error('variation_val') @enderror
@if($varval) @php $vardata = ($product->var_data)?json_decode($product->var_data, true):[]; @endphp @foreach($variations as $variation)
id, $proVar)) style="display:none;" @endif > Variation : {{$variation->name_en}}
@if($variation->input_type!='text')
@else
@endif
@if($variation->input_type!='text') @foreach($varval[$variation->id] as $value)
id, $vardata) && array_key_exists($value->id, $vardata[$variation->id])) value="{{$vardata[$variation->id][$value->id]['name']}}" @else value="{{$value->name_en}}" @endif id="varval" class="form-control" readonly>
id, $vardata) && array_key_exists($value->id, $vardata[$variation->id])) value="{{$vardata[$variation->id][$value->id]['price']}}" @else @if($variation->input_type=='checkbox') value="{{$value->price}}" @else value="0" @endif @endif id="price" placeholder="Price" type="number" step="0.0001">
id, $vardata) && array_key_exists($value->id, $vardata[$variation->id])) value="{{$vardata[$variation->id][$value->id]['sale_price']}}" @endif >
id, $vardata) && array_key_exists($value->id, $vardata[$variation->id])) value="{{$vardata[$variation->id][$value->id]['quantity']}}" @endif>
@endforeach @else
id, $vardata) && array_key_exists($variation->id, $vardata[$variation->id])) value="{{$vardata[$variation->id][$variation->id]['price']}}" @else value="{{$variation->textprice}}" @endif id="price" placeholder="Price" type="number" step="0.0001">
@endif
@endforeach @endif
Media
@if($product->thumbnail) @endif @error('thumbnail') @enderror
@if($product->gallery) @php $gallery = explode(',', $product->gallery); @endphp @foreach($gallery as $img)
@endforeach @endif
@if($product->video) @endif
@endsection @push('asset-bottom') @endpush