@extends('admin.layout') @section('main')

{{ $title_description??'' }}

{{-- descriptions --}} @foreach ($languages as $code => $language)
{{ $language->name }} {!! sc_image_render($language->icon,'20px','20px') !!}
@if ($errors->has('descriptions.'.$code.'.name')) {{ $errors->first('descriptions.'.$code.'.name') }} @endif
@if ($errors->has('descriptions.'.$code.'.keyword')) {{ $errors->first('descriptions.'.$code.'.keyword') }} @endif
@if ($errors->has('descriptions.'.$code.'.description')) {{ $errors->first('descriptions.'.$code.'.description') }} @endif
@if ($errors->has('descriptions.'.$code.'.content')) {{ $errors->first('descriptions.'.$code.'.content') }} @endif
@endforeach {{-- //descriptions --}} {{-- select category --}}

@php $listCate = []; if(is_array(old('category'))){ foreach(old('category') as $value){ $listCate[] = (int)$value; } } @endphp
@if ($errors->has('category')) {{ $errors->first('category') }} @endif
{{-- //select category --}} {{-- images --}}
@if ($errors->has('image')) {{ $errors->first('image') }} @endif
@if (!empty(old('sub_image'))) @foreach (old('sub_image') as $key => $sub_image) @if ($sub_image) @endif @endforeach @endif
{{-- //images --}} {{-- sku --}}
@if ($errors->has('sku')) {{ $errors->first('sku') }} @else {{ trans('product.sku_validate') }} @endif
{{-- //sku --}} {{-- select brand --}}
@if ($errors->has('brand_id')) {{ $errors->first('brand_id') }} @endif
{{-- //select brand --}} {{-- select vendor --}}
@if ($errors->has('vendor_id')) {{ $errors->first('vendor_id') }} @endif
{{--// select vendor --}} {{-- cost --}}
@if ($errors->has('cost')) {{ $errors->first('cost') }} @endif
{{-- //cost --}} {{-- price --}}
@if ($errors->has('price')) {{ $errors->first('price') }} @endif
{{-- //price --}} {{-- price promotion --}}
@if (old('price_promotion'))
{{ trans('product.price_promotion_start') }}
{{ trans('product.price_promotion_end') }}
@else @endif
{{-- //price promotion --}} {{-- stock --}}
@if ($errors->has('stock')) {{ $errors->first('stock') }} @endif
{{-- //stock --}} {{-- type --}}
@foreach ( $types as $key => $type) @endforeach @if ($errors->has('type')) {{ $errors->first('type') }} @endif
{{-- //type --}} {{-- virtual --}}
@foreach ( $virtuals as $key => $virtual) @endforeach @if ($errors->has('virtual')) {{ $errors->first('virtual') }} @endif
{{-- //virtual --}} {{-- date available --}}
@if ($errors->has('date_available')) {{ $errors->first('date_available') }} @endif
{{-- //date available --}} {{-- sort --}}
@if ($errors->has('sort')) {{ $errors->first('sort') }} @endif
{{-- //sort --}} {{-- status --}}
@if (old()) @else @endif
{{-- //status --}} {{-- //end List product build --}} {{-- List product attributes --}} @if (!empty($attributeGroup))

@foreach ($attributeGroup as $attGroupId => $attName) @if (!empty(old('attribute')[$attGroupId])) @foreach (old('attribute')[$attGroupId] as $attValue) @if ($attValue) @php $newHtml = str_replace('attribute_group', $attGroupId, $htmlProductAtrribute); $newHtml = str_replace('attribute_value', $attValue, $newHtml); @endphp {!! $newHtml !!} @endif @endforeach @endif
{{ $attName }}:


@endforeach
@endif {{-- //end List product attributes --}}
@endsection @push('styles') {{-- switch --}} {{-- input image --}} {{-- --}} @endpush @push('scripts') {{-- input image --}} {{-- --}} {{-- switch --}} @endpush