@section('extraCss') @endsection @php $addNew = '     Add'; @endphp @php $reqsubsub = !empty($article->id) ? $article->category_id : 0; $existingClasses = []; $existingColors = []; $existingSizes = []; $draftexistingClasses = []; $draftexistingColors = []; $draftexistingSizes = []; $existingColorss = []; $existingSizess = []; if(!empty($article->id) && $article->itemCodes->count() > 0): foreach($article->itemCodes as $iCode): $cls = ''; $colTemp = ''; $sizeTemp = ''; foreach($sizes as $tempSize) { if($tempSize->code == $iCode->size) { $sizeTemp = $tempSize->id; $existingSizes[] = $sizeTemp; break; } } foreach($colorFamilies as $colorFamily) { if(!empty($colorFamily->colors) && $colorFamily->colors->count() > 0) { foreach($colorFamily->colors as $col) { if($col->name == $iCode->color) { $colTemp = $col->id; $existingColors[] = $colTemp; break; } } } if($colTemp != '') { break; } } $cls = '_'.$sizeTemp.'_'.$colTemp; $clsCol = '_Col'.'_'.$colTemp; $clsSize = '_Size'.'_'.$sizeTemp; $existingClasses[] = $cls; endforeach; endif; if(!empty($draftarticle->id) && $draftarticle->itemCodes->count() > 0): foreach($draftarticle->itemCodes as $iCode): $cls = ''; $colTemp = ''; $sizeTemp = ''; foreach($sizes as $tempSize) { if($tempSize->code == $iCode->size) { $sizeTemp = $tempSize->id; $draftexistingSizes[] = $sizeTemp; $existingSizess[] = $iCode->size; break; } } foreach($colorFamilies as $colorFamily) { if(!empty($colorFamily->colors) && $colorFamily->colors->count() > 0) { foreach($colorFamily->colors as $col) { if($col->name == $iCode->color) { $colTemp = $col->id; $draftexistingColors[] = $colTemp; if(!in_array($iCode->color,$existingColorss)) { $existingColorss[] = $iCode->color; break; } break; } } } if($colTemp != '') { break; } } $cls = '_'.$sizeTemp.'_'.$colTemp; $clsCol = '_Col'.'_'.$colTemp; $clsSize = '_Size'.'_'.$sizeTemp; $draftexistingClasses[] = $cls; endforeach; endif; @endphp @if( \Auth::user()->id != 1)
@else id)) action="{{ route('articles-update', ['id' => $article->id]) }}" @else action="{{ route('articles-store') }}" @endif > @endif @csrf @isset($draftarticle->id) {{ method_field('PUT') }} @endisset
Basic Details

code)) readonly @else onblur="if(jQuery.trim(this.value) != '' && jQuery.inArray( this.value, allArticles) >= 0){toastr.error('Article already exists!'); this.value='';this.focus();$('.mixerDiv').hide();return false;} else {$('.mixerDiv').show();}" @endif >
@foreach($sections as $section) @endforeach
Attributes

Add more attributes to products.

{{-- ATTRIBUTE MASTERS HERE --}} @php $existProductMasterValues = []; if(!empty($article->mastervalues)): $tempMastervals = $article->mastervalues; foreach( $tempMastervals as $tempMasterval) { $existProductMasterValues[$tempMasterval->master_id][] = $tempMasterval->master_value_id; } endif; $draftexistProductMasterValues = []; $draftexistProductMasterValuess = []; if(!empty($draftarticle->mastervalues)): $tempMastervals = $draftarticle->mastervalues; foreach( $tempMastervals as $tempMasterval) { $masterValuess = \App\MasterValue::where('id',$tempMasterval->master_value_id)->first(); $draftexistProductMasterValuess[$tempMasterval->master_id][] = $masterValuess->name; $draftexistProductMasterValues[$tempMasterval->master_id][] = $tempMasterval->master_value_id; } endif; @endphp @foreach($masters as $master)

{{ $master->name }} {!! str_replace('{master}','master',str_replace('{field}','masterid_'.$master->id,$addNew)) !!}

{{-- @if(!empty($draftarticle)) @if((!empty($draftexistProductMasterValues[$master->id]) && count($draftexistProductMasterValues[$master->id]) > 0) && (!empty($draftexistProductMasterValues[$master->id]) && count($draftexistProductMasterValues[$master->id]) > 0)) @if((count(array_diff($draftexistProductMasterValues[$master->id],$existProductMasterValues[$master->id])))) @if(!empty($master->vals) && $master->vals->count() > 0) @foreach($master->vals as $val) @endforeach @endif @endif @endif @endif --}}
@endforeach {{-- ATTRIBUTE MASTERS HERE --}}

Variations

Select Both Colors and size to make the variations.

@include("backend.articles.product-combinations")
Component Details

@php $count = 0; @endphp @if(!empty($article->components) && count($article->components) > 0) @foreach($article->components as $key => $value) @php $count = $key +1 ; @endphp @endforeach @endif @if(!empty($draftarticle->components) && count($draftarticle->components) > 0) @foreach($draftarticle->components as $key => $value) @endforeach @endif
Component Qty Fabric Fabric Details Delete
OLD

Suggest Cordinates


@php $countadd = 0;@endphp @if(!empty($article) && count($article->sugesCodes) > 0) @foreach($article->sugesCodes as $key => $value) @php $countadd = $key +1 ; @endphp @endforeach @endif @if(!empty($draftarticle->sugesCodes) && count($draftarticle->sugesCodes) > 0) @foreach($draftarticle->sugesCodes as $key => $value) @endforeach @endif
Master Color ARTICLE COLOR Delete
OLD

Article Images

@php $counta = 1; @endphp @if(!empty($ArticleImg) && count($ArticleImg) > 0) @foreach($ArticleImg as $key => $value) @php $counta = $key +1 ; @endphp @endforeach @else @endif
Color Title Image Sort Order Action
color_name)}}" class="form-control" placeholder="Enter Image Color" required />

Cancel @if(!empty($article->code)) Print @endif
@section('extraJs') @endsection