{{-- Hidden fields --}} @if (isset($product->id) && $product->id) @endif @if (isset($product->parent_id) && $product->parent_id) @endif {{-- Product ID displayed to the admin --}} @if (is_admin() && isset($product) && $product) ID: {{ ($product->parent_id ? $product->parent_id : $product->id) }} @endif
{{-- Product Name & Description --}}
{!! Form::label('data[Product][' . $category->id . '][' . $i . '][name]', t('Name')) !!} {!! Form::text( 'data[Product][' . $category->id . '][' . $i . '][name]', (isset($product->name) ? $product->name : null), [ 'placeholder' => t('Product name'), 'data-error' => t('This field is required'), 'class' => 'form-control editable', ( isset($category->extra->items) && $category->extra->items != 1 ? 'required' : null ) ] ) !!}
@if (isset($settings->content->tiers) && $settings->content->tiers)
{!! Form::label('data[Product][' . $category->id . '][' . $i . '][tier]', t('Tier')) !!} {!! Form::select( 'data[Product][' . $category->id . '][' . $i . '][tier]', numbers(['min' => 1, 'max' => 5]), (isset($product->tier) ? $product->tier : null) ) !!}
@endif {{-- Description --}}
@if (!isset($product->terms) || !$product->terms) @t('terms & conditions') @endif {!! Form::label('data[Product][' . $category->id . '][' . $i . '][name]', t('Description')) !!} {!! Form::textarea( 'data[Product][' . $category->id . '][' . $i . '][description]', (isset($product->description) ? $product->description : null), [ 'placeholder' => t('Description'), 'class' => 'form-control editable' ] ) !!}
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][custom_price_label]', t('Price per person') ) !!} {!! Form::text( 'data[Product][' . $category->id . '][' . $i . '][custom_price_label]', (isset($product->custom_price_label) ? $product->custom_price_label : null), [ 'class' => 'form-control editable' ] ) !!}
{!! Form::text( 'data[Product][' . $category->id . '][' . $i . '][terms]', (isset($product->terms) ? $product->terms : null), [ 'placeholder' => t('Terms & Conditions'), 'class' => 'form-control editable' . (isset($product->terms) && $product->terms ? '' : ' hidden') ] ) !!}
@if ($category->extra->priced)
@if ($category->extra->deposit)
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][price]', t('Price to pay now') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][price]', (isset($product->price) ? $product->price : null), [ 'class' => 'form-control editable', 'step' => '0.01' ] ) !!}
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][actual_price]', t('Total Price') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][actual_price]', (isset($product->actual_price) ? $product->actual_price : null), [ 'class' => 'form-control editable', 'step' => '0.01' ] ) !!}
@else
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][price]', t('Price') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][price]', (isset($product->price) ? $product->price : null), [ 'class' => 'form-control editable', 'step' => '0.01' ] ) !!}
@endif
@endif
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][min_per_order]', t('Min Qty') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][min_per_order]', (isset($product->min_per_order) ? $product->min_per_order : null), [ 'class' => 'form-control editable', 'placeholder' => t('1') ] ) !!}
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][max_per_order]', t('Max Qty') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][max_per_order]', (isset($product->max_per_order) ? $product->max_per_order : null), [ 'class' => 'form-control editable', 'placeholder' => t('unlimited') ] ) !!}
{!! Form::label( 'data[Product][' . $category->id . '][' . $i . '][qty]', t('Qty') ) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][qty]', (isset($product->qty) ? $product->qty : null), array_merge([ 'class' => 'form-control editable', 'placeholder' => t('unlimited') ], ($category->finite ? ['required'] : [])) ) !!}
@if ($readonly) @else
{!! Form::checkbox( 'data[Product][' . $category->id . '][' . $i . '][unavailable]', 1, (isset($product->unavailable) ? $product->unavailable : false) ) !!}
@endif
@if ($category->extra->priced)
{!! Form::label('data[Product][' . $category->id . '][' . $i . '][type]', t('Type')) !!} {!! Form::select( 'data[Product][' . $category->id . '][' . $i . '][type]', [ 'buy' => __('Booking only'), 'both' => __('Booking & Enquiry'), 'enquiry' => __('Enquiry only') ], (isset($product->type) ? $product->type : null), [ 'class' => 'form-control editable' ] ) !!}
@endif @if ($category->capacity)
{!! Form::label('data[Product][' . $category->id . '][' . $i . '][capacity]', t('Capacity')) !!} {!! Form::number( 'data[Product][' . $category->id . '][' . $i . '][capacity]', (isset($product->capacity) ? $product->capacity : null), [ 'class' => 'form-control editable', 'placeholder' => t('unlimited') ] ) !!}
@endif