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

{{ translate('Add product') }}

@php $currency_name = currency_sympol()['name']; @endphp
{!! Form::open(['method' => 'post', 'action' => 'Admin\ProductController@storeRestorant', 'id' => 'choice_form', 'files' => true, 'class' => 'form_to_submit']) !!}

{{ translate('basic information') }}

{!! Form::text('title', null, ['required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Title')]) !!}
@error('title')
{{ $message }}
@enderror
{!! Form::text('sku', null, ['required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Sku')]) !!}
@error('sku')
{{ $message }}
@enderror
{!! Form::text('arrangement', 1, ['required' => 'required', 'class' => 'form-control', 'placeholder' => translate('arrangement')]) !!}
@error('arrangement')
{{ $message }}
@enderror
@if (Session::get('tenant_subscribtion_data')['product_label']['belongs_to_subscribtion'] == true && Session::get('tenant_controle_modules')['product_label'] == 1)
{!! Form::text('label_text', null, ['class' => 'form-control', 'placeholder' => translate('Label text')]) !!}
@error('label_text')
{{ $message }}
@enderror
{!! Form::color('label_color', null, ['class' => 'form-control', 'placeholder' => translate('Label color')]) !!}
@error('label_color')
{{ $message }}
@enderror
@endif
@error('category_id')
{{ $message }}
@enderror
{!! Form::checkbox('published', null, 0, ['id' => 'Checkbox_2']) !!}
{!! Form::checkbox('require_charge', null, 0, ['id' => 'require_charge_2']) !!}
{!! Form::textarea('short_desc', null, ['required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Short description')]) !!}
@error('short_desc')
{{ $message }}
@enderror
{!! Form::textarea('description', null, ['id' => 'e1', 'class' => 'form-control', 'placeholder' => translate('Description')]) !!}
@error('description')
{{ $message }}
@enderror
{!! Form::text('tags', null, ['style' => 'width:100%', 'data-role' => 'tagsinput', 'class' => 'form-control', 'placeholder' => translate('Tags')]) !!}
@error('tags')
{{ $message }}
@enderror
{!! Form::checkbox('refundable', null, 1, ['id' => 'refundable_2']) !!}

{{ translate('price + stock') }}

{!! Form::number('unit_price', null, ['min' => '0', 'step' => '0.01', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Unit price')]) !!}
{{ $currency_name }}
@error('unit_price')
{{ $message }}
@enderror
{!! Form::number('cost_price', null, ['min' => '0', 'step' => '0.01', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Cost Price')]) !!}
{{ $currency_name }}
@error('cost_price')
{{ $message }}
@enderror
{!! Form::number('market_price', null, ['min' => '0', 'step' => '0.01', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Cost Price')]) !!}
{{ $currency_name }}
@error('market_price')
{{ $message }}
@enderror
{!! Form::number('current_stock', 5, ['id' => 'current_stock_id', 'min' => '0', 'step' => '1', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Quantity')]) !!}
@error('current_stock')
{{ $message }}
@enderror
{!! Form::checkbox('current_stock_unlimited', null, 0, ['id' => 'Checkboxs_12']) !!}
{!! Form::number('weight', null, ['min' => '0', 'step' => '1', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Weight')]) !!}
@error('weight')
{{ $message }}
@enderror
{!! Form::select('measruing_unit', ['kg' => 'KG', 'g' => 'G', 'lb' => 'LB'], null, ['id' => 'measruing_unit', 'class' => 'form-control ']) !!}
{!! Form::number('discount', 0, ['min' => '0', 'step' => '0.01', 'class' => 'form-control', 'placeholder' => translate('Discount')]) !!}
@error('discount')
{{ $message }}
@enderror
{!! Form::select('discount_type', ['amount' => translate('Amount'), 'percent' => translate('Percent')], null, ['class' => 'form-control']) !!}

{{ translate('Variations') }} {{ translate('Allow your customers to choose from options such as color or sizes on your store') }}

{!! Form::select('choice_attributes[]', $attributes, null, ['style' => 'width: 100%;', 'multiple' => 'multiple', 'class' => 'form-control select2', 'id' => 'choice_attributes']) !!}
{{ translate('Choose the attributes of this product and then input values of each attribute') }}

{{ translate('Specs') }}

{{ translate('Show the product features in a simplified way to your customer, for example (length: 10 cm - width: 10 cm)') }}
{{ translate('Add spec') }}

@if (Session::get('serialized_specs_array')) @foreach (Session::get('serialized_specs_array') as $key => $value)
{!! Form::text('serialized_specs[key][]', $key, ['class' => 'form-control', 'placeholder' => translate('Spec key')]) !!}
{!! Form::text('serialized_specs[value][]', $value, ['class' => 'form-control', 'placeholder' => translate('Spec value')]) !!}
@endforeach @endif
@if (Session::get('tenant_subscribtion_data')['meta_data']['belongs_to_subscribtion'] == true && Session::get('tenant_controle_modules')['meta_data'] == 1)

{{ translate('Meta') }} {{ translate('SEO results control what you see when this product is displayed in a search engine') }}

{!! Form::text('meta_title', null, ['class' => 'form-control', 'placeholder' => translate('Meta title')]) !!}
@error('meta_title')
{{ $message }}
@enderror
{!! Form::textarea('meta_description', null, ['rows' => 4, 'class' => 'form-control', 'placeholder' => translate('Meta description')]) !!}
@error('meta_description')
{{ $message }}
@enderror
@error('meta_image')
{{ $message }}
@enderror
@endif {!! Form::Close() !!}

{{ translate('Product attaches') }} *

@endsection @section('modal') @endsection @section('script') @endsection