@include('includes.form_errors') {!! Form::open(['method'=>'post', 'action'=>'ManageProductsController@store', 'files'=>true, 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']) !!}
{!! Form::label('existing_product', __('From Existing Product:')) !!}

{!! Form::label('name', __('Product Name:')) !!} {!! Form::text('name', null, ['class'=>'form-control', 'placeholder'=>__('Enter name'), 'required'])!!}
{!! Form::label('description', __('Description:')) !!} {!! Form::textarea('description', null, ['class'=>'form-control', 'placeholder'=>__('Enter description')]) !!}
{!! Form::label('model', __('Model Name / Version:')) !!} {!! Form::text('model', null, ['class'=>'form-control', 'placeholder'=>__('Enter model number / version')])!!}
{!! Form::label('regular_price', __('Regular Price:')) !!} {!! Form::number('regular_price', null, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>__('Enter regular price')]) !!}
{!! Form::label('price', __('Base Selling Price:')) !!} {!! Form::number('price', null, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>__('Enter selling price'), 'required']) !!}
{!! Form::label('sku', __('SKU:')) !!} {!! Form::text('sku', null, ['class'=>'form-control', 'placeholder'=>__('Enter sku')])!!}
{!! Form::label('hsn', __('HSN:')) !!} {!! Form::text('hsn', null, ['class'=>'form-control', 'placeholder'=>__('Enter hsn')])!!}
{!! Form::label('tax_rate', __('Tax Rate:')) !!} {!! Form::number('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, null, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@if(count($root_categories) > 0)
@lang('Categories Tree:')
    @foreach($root_categories as $category)
  • {{ $category->name . ' (' . __('ID:') . ' '.$category->id.')' }} @if(count($category->categories)) @include('partials.manage.subcategories', ['childs' => $category->categories]) @endif
  • @endforeach

@endif
@lang('Specification Type') @lang('Value') @lang('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, red')])!!} {!! Form::text('specification_type_unit[]', null, ['class'=>'form-control', 'placeholder'=>__('kg, GHz (Leave blank if no unit)')])!!}

@lang('Name') @lang('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)']) !!} @lang('No file chosen')
{!! Form::label('in_stock', __('Number in Stock:')) !!} {!! Form::number('in_stock', null, ['class'=>'form-control', 'placeholder'=>__('Enter number in stock')]) !!}
{!! Form::label('qty_per_order', __('Maximum allowed Quantity per Order:')) !!} {!! Form::number('qty_per_order', null, ['class'=>'form-control', 'placeholder'=>__('Enter maximum allowed quantity per order')]) !!}
{!! Form::label('status', __('Status:')) !!} {!! Form::select('status', [0=>__('inactive'), 1=>__('active')], 1, ['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)']) !!} @lang('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))']) !!} @lang('No image chosen') (@lang('Hold Ctrl to select multiple images'))
@include('partials.manage.meta-fields')
{!! Form::submit(__('Add Product'), ['class'=>'btn btn-primary btn-block', 'name'=>'submit_button']) !!}
{!! Form::close() !!}