@extends('layouts.master') @section('page') Checkout | {{setting('site.title')}} @endsection @section('content')
@if (session()->has('success_message'))
{{ session()->get('success_message') }}
@endif @if(count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@if(auth()->user()->cart->count() > 0)

Order Summary

@foreach (auth()->user()->cart as $item)
{{$item->product->name}}
{{ $item->product->name }}
{{ $item->product->details }}
${{ $item->price }}
{{ $item->quantity }}

@endforeach
Subtotal Delivery charge Total
$ {{$cart->sum('price')}} $ 2.00 $ {{ $cart->sum('price') + 2.00 }}

@endif

Billing Details

{{ csrf_field() }}
@if (auth()->user()->second_address && auth()->user()->first_address == NULL) Add another address @endif @if (auth()->user()->second_address == NULL) Add another address @endif @if(auth()->user()->first_address && auth()->user()->second_address)


@endif

@if(auth()->user()->cart->count() > 0) @else Place Order @endif
@endsection @push('styles') @endpush()