@extends($data['layout']) @section('title', 'Checkout - ' . app_name()) @section('content')
@if($data['layout'] == 'frontend.layouts.app' ) @include('includes.partials.bread-crumbs') @endif
{{--

Checkout

--}}
@if(session()->get('flash_danger')) @endif @if(request()->input('pc') == '1') @endif @if(!$data['customer']) @endif
Please select from already saved addresses:
@if($data['customer'] && count($data['customer']->addresses) > 0) @foreach($data['customer']->addresses as $address)
{{ $address->first_name . ' ' . $address->last_name }}
@if(trim($address->company) != null) {{ $address->company }}
@endif {!! $address->address1.'
'. ( empty($address->address2) ? '' : $address->address2 . '
' ) . $address->city.', '. \App\Models\State::get_state_name($address->state) .', '.$address->zip.'
'. \App\Models\Country::get_country_name($address->country) !!} @if(trim($address->phone) != null)
Tel: {{ $address->phone }} @endif
id) checked="checked" @endif>
@endforeach
@endif
{!! Form::open(array('method' => 'POST', 'id' => 'frm_checkout_address')) !!}
@if(!$data['customer'])
{!! Form::label('email', 'Email Address:') !!} {{-- {!! Form::text('email', $data['v_shipping_details']['email'], ['required' => 'required', 'class' => 'text_input', 'placeholder' => 'Enter email address ...', 'id' => 'sp_email', 'type' => 'email']) !!} --}}
@endif
{!! Form::label('first_name', 'First Name:') !!} {!! Form::text('first_name', $data['v_shipping_details']['first_name'],['required' => 'required', 'placeholder'=>'Enter first name ...', 'class' => 'text_input']) !!}
{!! Form::label('last_name', 'Last Name:') !!} {!! Form::text('last_name', $data['v_shipping_details']['last_name'],['required' => 'required', 'placeholder'=>'Enter last name ...', 'class' => 'text_input']) !!}
{!! Form::label('company', 'Company:') !!} {!! Form::text('company', $data['v_shipping_details']['company'],['placeholder'=>'Enter company name ...', 'class' => 'text_input']) !!}
{!! Form::text('address1', $data['v_shipping_details']['address1'],['required' => 'required', 'placeholder'=>'Enter address line 1...', 'id' => 'address1', 'class' => 'text_input']) !!}
{!! Form::text('address2', $data['v_shipping_details']['address2'],['placeholder'=>'Enter address line 2 ...', 'id' => 'address2', 'class' => 'text_input']) !!}
{!! Form::label('country', 'Country:') !!} {!! Form::select('country', $data['countries'], $data['v_shipping_details']['country'],['class' => 'form-control', 'required' => 'required', 'class' => 'text_input', 'onchange="get_states(this.value);"', 'placeholder'=>'Select country ...']) !!}
{!! Form::label('state', 'State:') !!}
@php $show_text_field = true; if(isset($data['address'])) { if(is_numeric($data['address']->state)) $show_text_field = false; } @endphp @if($show_text_field) {!! Form::text('state', $data['v_shipping_details']['state'], ['required' => 'required', 'placeholder'=>'Enter state ...', 'class' => 'text_input']) !!} @else {!! Form::select('state', $data['states'], $data['v_shipping_details']['state'],['class' => 'text_input', 'required' => 'required', 'placeholder'=>'Enter state ...']) !!} @endif
{!! Form::label('city', 'City:') !!} {!! Form::text('city', $data['v_shipping_details']['city'],['required' => 'required', 'placeholder'=>'Enter city ...', 'class' => 'text_input']) !!}
{!! Form::label('zip', 'Zip / Post Code:') !!} {!! Form::text('zip', $data['v_shipping_details']['zip'],['required' => 'required', 'maxlength'=>'8', 'placeholder'=>'Enter zip / post code ...', 'class' => 'checkout_zip_code text_input', 'id' =>'checkout_zip']) !!}
{!! Form::label('phone', 'Phone:') !!} {{-- {!! Form::text('phone', $data['v_shipping_details']['phone'],['required' => 'required','pattern'=>"\d*",'maxlength'=>'13', 'placeholder'=>'Enter phone ...', 'class' => 'text_input' , 'id' =>'checkout_phone']) !!} --}} {{ html()->text('phone')->value($data['v_shipping_details']['phone']) ->placeholder(__('validation.attributes.frontend.phone')) ->class(['phone', 'text_input']) ->id('phone') ->required() ->style('transition:none') }}
@if($data['customer'] && count($data['customer']->addresses) > 0) @endif
{!! Form::close() !!}
{!! Form::open(array('method' => 'POST', 'id' => 'frm_checkout_shipping')) !!} {{-- {!! Form::open(array('route' => 'frontend.save-order', 'method' => 'POST', 'id' => 'frm_checkout_shipping')) !!} --}} @php if((!empty($data['shipping_details']['email']) && !isset($data['shipping_rate'])) || $data['checkout_step'] == '2') $css = ''; else $css = 'class="collapse"'; @endphp
@if(isset($data['rates']) && !isset($data['rates']['status'])) @foreach($data['rates'] as $service)
@endforeach @elseif(isset($data['rates']) && isset($data['rates']['status']) && $data['rates']['status'] == 0) @else Sorry, no quotes are available for this order at this time.

@endif
@php $notes = ''; if(isset($data['shipping_details']['notes'])) $notes = $data['shipping_details']['notes']; @endphp
{!! Form::label('notes', 'Shipping / Order Notes:') !!}
{!! Form::textarea('notes', $notes, ['rows' => 4, 'placeholder'=>'Notes about your order, e.g. special notes for delivery ...', 'class' => 'form-control']) !!}
{{-- --}}
{!! Form::close() !!}
@php if((!empty($data['shipping_details']['email']) && isset($data['shipping_rate'])) || $data['checkout_step'] == '3') $css = ''; else $css = 'class="collapse"'; @endphp
{!! Form::open(array('route' => 'frontend.save-order', 'method' => 'POST', 'id' => 'frm_payment_method')) !!} {!! Form::hidden('payment_method', null, ['id' => 'payment_method']) !!}
Pay Using PayPal PayPal
Fast, easy and secure
Pay Using Credit / Debit Card Pay with Credit Cards
Visa, AMEX, MasterCard, Discover
@if($data['customer'] && $data['customer']->group->bank_payment == 'Y')
Pay By Bank Transfer Pay with Bank Transfer
{!! \App\Models\Settings::getSettingValue(1) !!}
@endif
{!! Form::hidden('h_shipping_details_exists', $data['h_shipping_details_exists'], ['id' => 'h_shipping_details_exists']) !!} {!! Form::hidden('h_shipping_method_exists', $data['h_shipping_method_exists'], ['id' => 'h_shipping_method_exists']) !!} {!! Form::close() !!}

Order Review

Product Total

    @php $sub_total = 0; $bogo_discount = 0; @endphp @foreach($data['cart'] as $cart) @php //$sub_total += $cart->getPriceWithConditions(); $item_price = $cart->getPriceWithConditions(); $total_price = $cart->getPriceSumWithConditions(); if($cart->bogo_free) { $total_price_discount = $cart->bogo_free * $item_price; $bogo_discount += $total_price_discount; $talal_price_after_bogo = $total_price - $total_price_discount; } if($cart->bogod_count) { $discounted_price = ($item_price * $cart->bogod_percent) / 100; $total_price_discount = $cart->bogod_count * $discounted_price; $bogo_discount += $total_price_discount; $talal_price_after_bogo = $total_price - $total_price_discount; } $sub_total += $total_price; @endphp
  • {{ $cart->name }}
    {{ $cart->attributes->sku }}   ({{ $cart->quantity }}) @if($cart->bogo_free)
    {{ $cart->bogo_free }} free @if($cart->bogo_free > 1) items @else item @endif @elseif($cart->bogod_count)
    {{ $cart->bogod_percent }}% discount on {{ $cart->bogod_count }} @if($cart->bogod_count > 1) items @else item @endif @endif
    @if($cart->bogo_free || $cart->bogod_count) ${{ number_format($talal_price_after_bogo, 2) }} {{--{{ $cart->bogo_free }} free @if($cart->bogo_free > 1) items @else item @endif--}} @else bogo_free || $cart->bogod_count) class="old-price" @endif>${{ number_format($cart->getPriceSumWithConditions(), 2) }} @endif
  • @endforeach
@php $discount = 0; if(request()->session()->get('ses_coupon')) { $coupon = request()->session()->get('ses_coupon'); if($coupon['type'] == 'amount') { $discount = $coupon['value']; } else { $discount = ($sub_total * $coupon['value']) / 100; } } if($bogo_discount) { $discount += $bogo_discount; } if( request()->session()->get('ses_shipping_rate') ) $shipping_rate = request()->session()->get('ses_shipping_rate'); else $shipping_rate = 0; $grand_total = ($sub_total + $shipping_rate) - $discount; session()->put('ses_grand_total', $grand_total); @endphp

Sub Total ${{ number_format($sub_total, 2) }}

Discount ${{ number_format($discount, 2) }}

Shipping Fee {{ $data['shipping_rate'] ?? "$0.00" }}

Grand Total ${{ number_format($grand_total, 2) }}

@push('after-scripts') @if($data['layout'] == 'frontend.layouts.mobile' ) @endif @endpush @endsection