@include('includes.tinymce')
{!! Form::label('name', 'Product Name:') !!} {!! Form::text('name', $product->name, ['class'=>'form-control', 'placeholder'=>'Enter name', 'required'])!!}
{!! Form::label('description','Description:') !!} {!! Form::textarea('description', $product->description, ['class'=>'form-control', 'placeholder'=>'Enter description']) !!}
{!! Form::label('model', 'Model Name / Version:') !!} {!! Form::text('model', $product->model, ['class'=>'form-control', 'placeholder'=>'Enter model number / version'])!!}
{!! Form::label('regular_price', 'Regular Price:') !!} {!! Form::number('regular_price', $product->old_price, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>'Enter regular price']) !!}
{!! Form::label('price', 'Selling Price:') !!} {!! Form::number('price', $product->price, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>'Enter selling price', 'required']) !!}
@if(count($variants)) @foreach($variants as $key => $variant) @php $class = ''; $checked = 0; if (isset($variant['c'])){ if(strtoupper($variant['c']) == '1'): $class = 'colorPickSelector'; $checked = 1; endif; } @endphp
@foreach($variant['v'] as $value) @endforeach
@lang('Name') @lang('Additional Cost')
@endforeach @endif
{!! Form::label('sku', 'SKU:') !!} {!! Form::text('sku', $sku, ['class'=>'form-control', 'placeholder'=>'Enter sku'])!!}
{!! Form::label('hsn', 'HSN:') !!} {!! Form::text('hsn', $hsn, ['class'=>'form-control', 'placeholder'=>'Enter hsn'])!!}
{!! Form::label('tax_rate', 'Tax Rate:') !!} {!! Form::number('tax_rate', $product->tax_rate ? $product->tax_rate : 0, ['class'=>'form-control', 'step'=>'any', 'min'=>0, 'max'=>100, 'placeholder'=>'Enter tax rate', 'required']) !!}
{!! Form::label('brand', 'Brand:') !!} {!! Form::select('brand', [''=>__('Choose Option')] + $brands, $product->brand_id, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@if(count($product->specificationTypes) > 0) @foreach($product->specificationTypes as $product_specification_type) @endforeach @else @endif
Specification Type Value Unit
{!! Form::select('specification_type[]', $specification_types, $product_specification_type->id, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!} {!! Form::text('specification_type_value[]', $product_specification_type->pivot->value, ['class'=>'form-control', 'placeholder'=>'Example: 14, 3.5, red'])!!} {!! Form::text('specification_type_unit[]', $product_specification_type->pivot->unit, ['class'=>'form-control', 'placeholder'=>'kg, GHz (Leave blank if no unit)'])!!}
{!! Form::select('specification_type[]', $specification_types, null, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!} {!! Form::text('specification_type_value[]', null, ['class'=>'form-control', 'placeholder'=>'Example: 14, 3.5'])!!} {!! Form::text('specification_type_unit[]', null, ['class'=>'form-control', 'placeholder'=>'Example: inch, kg'])!!}

@if(count($custom_fields = unserialize($product->custom_fields)) > 0 && is_array($custom_fields)) @foreach($custom_fields as $key => $field) @endforeach @else @endif
Name Value
{!! Form::text('custom_field_name[]', $key, ['class'=>'form-control', 'placeholder'=>'Name'])!!} {!! Form::text('custom_field_value[]', $field, ['class'=>'form-control', 'placeholder'=>'Value'])!!}
{!! Form::text('custom_field_name[]', null, ['class'=>'form-control', 'placeholder'=>'Name'])!!} {!! Form::text('custom_field_value[]', null, ['class'=>'form-control', 'placeholder'=>'Value'])!!}

{!! Form::label('file', 'Choose File In Zip', ['class'=>'btn btn-default btn-file']) !!} {!! Form::file('file',['class'=>'form-control', 'style'=>'display: none;','onchange'=>'$("#upload-file-name").html(files[0].name)']) !!} No file chosen
{!! Form::label('in_stock','Number in Stock:') !!} {!! Form::number('in_stock', $product->in_stock, ['class'=>'form-control', 'placeholder'=>'Enter number in stock']) !!}
{!! Form::label('qty_per_order','Maximum allowed Quantity per Order:') !!} {!! Form::number('qty_per_order', $product->qty_per_order, ['class'=>'form-control', 'placeholder'=>'Enter maximum allowed quantity per order']) !!}
{!! Form::label('status', 'Status:') !!} {!! Form::select('status', [0=>__('inactive'), 1=>__('active')], $product->is_active, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::label('photo', 'Choose Featured Image', ['class'=>'btn btn-default btn-file']) !!} {!! Form::file('photo',['class'=>'form-control', 'style'=>'display: none;','onchange'=>'$("#upload-file-info").html(files[0].name)']) !!} No image chosen
{!! Form::label('photos[]', 'Choose More Images', ['class'=>'btn btn-default btn-file']) !!} {!! Form::file('photos[]',['class'=>'form-control', 'multiple', 'style'=>'display: none;','onchange'=>'$("#upload-files-info").html(moreImagesNames(files))']) !!} No image chosen (Hold Ctrl to select multiple images)
{!! Form::label('meta_title','Meta Title:') !!} {!! Form::text('meta_title', $product->meta_title, ['class'=>'form-control', 'placeholder'=>'Enter meta title']) !!}
{!! Form::label('meta_desc','Meta Description:') !!} {!! Form::text('meta_desc', $product->meta_desc, ['class'=>'form-control', 'placeholder'=>'Enter meta description']) !!}
{!! Form::label('meta_keywords','Meta Keywords:') !!} {!! Form::text('meta_keywords', $product->meta_keywords, ['class'=>'form-control', 'placeholder'=>'Enter meta keywords']) !!}