1. {{ __('Admin') }}
  2. @isset($_GET['user_id'])
  3. {{ __('User') }}
  4. @endisset
  5. {{ __('Orders') }}
  6. {{ __('Create') }}

Create
@isset($_GET['user_id'])
@php $user = \App\Models\User::find($_GET['user_id']); @endphp {{-- --}}
Full name {{$user->full_name}}
Short name {{$user->short_name}}
Role{{$user->role->display_name}}
Affiliation{{$user->affiliation_type->name}}
Address: {{$user->address}}
{{$user->city}}, {{$user->state}} {{$user->zip}}
{{$user->country}}
Email{{$user->email}}
Phone{{preg_replace("/^(\d{3})(\d{3})(\d{4})$/", "($1) $2-$3", $user->phone)}}
Mobile{{ $user->is_mobile == 1 ? 'Yes' : 'No'}}
Mobile Authorized{{$user->sms_authorized == 1 ? 'Yes' : 'No'}}
Email Verified?{{$user->email_verified_at != null ? "Yes" : "No"}}
Is Active?{{$user->is_active == 1 ? "Yes" : "No"}}
View Mode{{ $user->is_darkmode == 0 ? "Light" : "Dark"}}
Stripe Customer Record @if($user->stripe_id) View on stripe.com @endif
@endisset {!! Form::open(['route' => 'admin.orders.store', 'method' => 'POST']) !!}
{{Form::hidden('user_id', $_GET['user_id'])}} {{Form::hidden('repeat_customer', 1)}}

Main Event Registration:

Enter the number of people you are registering below. You will then be asked to provide the badge information for each registrant. Please note, this year we have added the AA/Al-Anon designation for our Double Winners!

{{ Form::text('event_registration', 1, ['class' => 'reginput text-right text-base dark:bg-slate-600 dark:text-slate-300 dark:border-slate-900', 'readonly', 'x-model' => 'event_registration']) }}
{{ Form::label('event_registration','Registration ($'.$product_registration->price.')', ['size' => '10', 'class' => 'reginput dark:text-slate-300']) }}
$ @if(isset($order) && $order->items()->where('item_id',1)->first()) {{$product_registration->price * $order->items()->where('item_id',1)->first()->quantity}} @else 0.00 @endif
@if(!isset($order)) @else {{--
@php $i = 0; @endphp @foreach($order->attendees as $attendee)

Badge Info

{{ Form::label('badgename','Badge Name', ['class' => 'col-sm-2 control-label pt-0 dark:text-slate-300']) }} {{ Form::text('badgename['.$i.'][]', $attendee->tag_line_1, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900'], ['maxlength' => 20]) }}
{{ Form::label('group','Group or City', ['class' => 'col-sm-2 control-label pt-0 dark:text-slate-300']) }} {{ Form::text('group['.$i.'][]', $attendee->tag_line_2, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900'], ['maxlength' => 25]) }}
Affiliation:
{{ Form::radio('affiliation['.$i.'][]', 1, $attendee->affiliation_type_id == 1 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('aa','AA', ['class' => 'dark:text-slate-300 pr-4']) }} {{ Form::radio('affiliation['.$i.'][]', 2, $attendee->affiliation_type_id == 2 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('al-anon','Al-Anon', ['class' => 'dark:text-slate-300 pr-4']) }} {{ Form::radio('affiliation['.$i.'][]', 5, $attendee->affiliation_type_id == 5 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('aa-al-anon',' AA/Al-Anon', ['class' => 'dark:text-slate-300 pr-4']) }} @if(\App\Models\Setting::where('key', 'HAS_ACA_AFFILIATION')->first()->value) {{ Form::radio('affiliation['.$i.'][]', 3, $attendee->affiliation_type_id == 3 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('aca','ACA', ['class' => 'dark:text-slate-300 pr-4']) }} @endif @if(\App\Models\Setting::where('key', 'HAS_ALATEEN_AFFILIATION')->first()->value) {{ Form::radio('affiliation['.$i.'][]', 3, $attendee->affiliation_type_id == 3 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('alateen','Alateen', ['class' => 'dark:text-slate-300 pr-4']) }} @endif {{ Form::radio('affiliation['.$i.'][]', 4, $attendee->affiliation_type_id == 4 ? true : false, [':name' => '"affiliation['.$i.'][]"']) }} {{ Form::label('guest','Guest', ['class' => 'dark:text-slate-300 pr-4']) }}
@php $i++; @endphp @endforeach
--}} @endif
@foreach($categories as $category)
@if($category->id_parent == 0)

@if($category->abstract == "")

{{ $category->title }} @if(\Auth::user() && \Auth::user()->role->name == 'su') [Edit] @endif

@else

{{ $category->abstract }} @if(\Auth::user() && \Auth::user()->role->name == 'su') [Edit] @endif

@endif @if($category->image)
×
@endif

{!! $category->description !!}

@else

{{$category->abstract}}

@endif @if($category->products()->where('published', 1)->orderBy('sort')->count() > 0) @foreach($category->products()->where('published', 1)->orderBy('sort')->get() as $product) @if($product->field_type_id == 2)
@if($product->quantity_on_hand > 0 && $product->is_sellable == 1)
{{ Form::text('product['.$product->id.']', 0, ['id' => 'product'.$product->id, 'class' => 'reginput text-base dark:bg-slate-600 dark:text-slate-300 dark:border-slate-900', 'readonly', 'x-model' => 'category'.$category->id]) }}
@else @if($product->quantity_on_hand <= 0)
Sold Out
@elseif($product->is_sellable == 0)
Not Currently Available
@endif @endif
@if($product->quantity_on_hand <= 0 || $product->is_sellable == 0)
@else
@endif {{ Form::label('product['.$product->id.']',$product->title, ['class' => 'dark:text-slate-300']) }} {{ Form::hidden('product'.$product->id.'_price',$product->price) }}
@if(!in_array($product->id, [44,46,48])) @if($product->quantity_on_hand <= 0 || $product->is_sellable == 0)
@else
@endif @if($product->price == 0) Free! @else $ @if(isset($order)) @if($product->id == 82) ${{number_format($product->price * $order->items()->where('item_id',$product->id)->get()->count(),2)}} @elseif($order->items()->where('item_id',$product->id)->get()->count() > 0) ${{number_format($product->price * $order->items()->where('item_id',$product->id)->first()->quantity,2)}} @endif @else $0.00 @endif @endif
@endif
@if($product->category_id == 15) @endif
@elseif($product->field_type_id == 5)
{{ Form::label('product['.$product->id.']',$product->title, ['class' => 'text-xl dark:bg-slate-800 dark:text-slate-300 dark:border-slate-900']) }}
${{ Form::number('product['.$product->id.']', (isset($order) && $order->items()->where('item_id',$product->id)->get()->count() > 0) ? $order->items()->where('item_id',$product->id)->first()->quantity : null, ['class' => 'w-40 text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900'],) }}
@elseif($product->field_type_id == 6)
{{ Form::label('product['.$product->id.']',$product->title, ['class' => 'col-sm-2 control-label text-left']) }}
@php $value = null; if(isset($order) && $order->items()->where('item_id',$product->id)->get()->count() > 0) { $value = $order->items()->where('item_id',$product->id)->first()->quantity; } elseif(isset($order) && in_array($product->id, [13,14,15,16])) { if($product->id == 13) { $value = $order->golfers[0]->golfer1; } elseif($product->id == 14) { $value = $order->golfers[0]->golfer2; } elseif($product->id == 15) { $value = $order->golfers[0]->golfer3; } elseif($product->id == 16) { $value = $order->golfers[0]->golfer4; } } @endphp
{{ Form::text('product['.$product->id.']', $value) }}
@endif @endforeach @else @foreach($category->child()->where('published', 1)->get() as $c) {{-- SUBSECTION: cid: {{$category->id}} | pub: {{ $category->pub }} | sort: {{ $category->sort }} --}}

{{$c->title}} @if(\Auth::user() && \Auth::user()->role->name == 'su') [Edit] @endif

@if($c->image)

×
@endif {!! $c->description !!}

{{$c->abstract}}

@foreach($c->products()->where('published', 1)->orderBy('sort')->get() as $product) @if($product->field_type_id == 2)
{{ Form::text('product['.$product->id.']', 0, ['id' => 'product'.$product->id, 'class' => 'reginput text-base dark:bg-slate-600 dark:text-slate-300 dark:border-slate-900', 'readonly', 'x-model' => 'product_'.$product->id]) }}
{{ Form::label('product['.$product->id.']',$product->title, ['class' => 'text-left dark:text-slate-300']) }} {{ Form::hidden('product'.$product->id.'_price',$product->price) }}
@if(!in_array($product->id, [44,46,48]))
$ @if($product->price == 0) Free! @else @if(isset($order) && $order->items()->where('item_id',$product->id)->get()->count() > 0) {{$product->price * $order->items()->where('item_id',$product->id)->first()->quantity}} @else 0.00 @endif @endif
@endif
@if($product->id == 3)

Golfers

Golfer 1
{{ Form::text('golfer1', isset($order) && count($order->golfers) > 0 ? $order->golfers[0]->golfer1 : null, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900']) }} Golfer 2
{{ Form::text('golfer2', isset($order) && count($order->golfers) > 0 ? $order->golfers[0]->golfer2 : null, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900']) }} Golfer 3
{{ Form::text('golfer3', isset($order) && count($order->golfers) > 0 ? $order->golfers[0]->golfer3 : null, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900']) }} Golfer 4
{{ Form::text('golfer4', isset($order) && count($order->golfers) > 0 ? $order->golfers[0]->golfer4 : null, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900']) }}
@endif
@elseif($product->field_type_id == 5)
{{ Form::label('product['.$product->id.']',$product->title, ['class' => 'col-sm-6 control-label text-left']) }}
$
{{ Form::number('product['.$product->id.']', (isset($order) && $order->items()->where('item_id',$product->id)->get()->count() > 0) ? $order->items()->where('item_id',$product->id)->first()->quantity : null) }}
@elseif($product->field_type_id == 6)
{{ Form::label('product['.$product->id.']',$product->title, ['class' => 'col-sm-2 control-label text-left']) }}
@php $value = null; if(isset($order) && $order->items()->where('item_id',$product->id)->get()->count() > 0) { $value = $order->items()->where('item_id',$product->id)->first()->quantity; } elseif(isset($order) && in_array($product->id, [52,53,54,55])) { if($product->id == 52) { $value = $order->golfers[0]->golfer1; } elseif($product->id == 53) { $value = $order->golfers[0]->golfer2; } elseif($product->id == 54) { $value = $order->golfers[0]->golfer3; } elseif($product->id == 55) { $value = $order->golfers[0]->golfer4; } } @endphp {{ Form::text('product['.$product->id.']', $value) }}
@endif @endforeach @endforeach @endif
@endforeach

Notes/Special Requests (optional)

{{ Form::label('comments', ' ', ['class' => 'col-sm-12 control-label text-left']) }}
{{ Form::textarea('comments', isset($order) ? $order->comments : null, ['class' => 'text-xl dark:bg-slate-700 dark:text-slate-300 dark:border-slate-900', 'rows' => '3'],) }}
{!! Form::close() !!}