@extends('frontend.layouts.app3') @section('seo') Final Checkout | Muhlach Bakery @endsection @section('content') @php $cart_total = 0; @endphp @if (session('cart')) @foreach (session('cart') as $cart) @php $cart_total += $cart['amount'] * $cart['price']; @endphp @endforeach @endif
@csrf @php $deliveryFee = session('service_type') === 'Delivery' ? session('delivery_fee', 50.0) : 0.0; $total = $cart_total + $deliveryFee; @endphp @foreach (session('cart') as $cart) @endforeach @foreach (session('cart') as $cart) @endforeach @php $assignedTime = \Carbon\Carbon::parse(session()->get('assigned_time'))->format('g:i A'); $assignedDate = \Carbon\Carbon::parse(session()->get('assigned_date'))->format('F d, Y'); @endphp

Final Checkout

Name:

{{ session('full_name') }}

Contact No.:

{{ session('contact_no') }}

Email:

{{ session('email') }}

Service Type:

{{ session('service_type') }}

Assigned Date & Time:

{{ $assignedDate }} at {{ $assignedTime }}

Special Instructions:

{{ session('special_instructions') }}

Orders:

@if (session('cart')) @foreach (session('cart') as $cart) @if ($cart['amount'] != 0)
{{ $cart['name'] }} x {{ $cart['amount'] }}
P {{ number_format($cart['amount'] * $cart['price'], 2) }}
@endif @endforeach @endif
@if (session()->get('service_type') === 'Delivery')

Delivery Fee:

P {{ number_format($deliveryFee, 2) }}

@endif
Total:
P {{ number_format($total, 2) }}
@endsection