@extends('layouts.frontend') @section('title', 'Order Details') @section('content')

Order Details

@if(session('success')) @endif @if(session('error')) @endif
Order #{{ $order->order_number }}

Status: {{ ucfirst($order->status) }}

Order Date: {{ $order->created_at->format('F d, Y h:i A') }}

Order Items:
@foreach($order->items as $item) @endforeach
Product Quantity Price Subtotal
{{ $item->product->name }} {{ $item->quantity }} ${{ number_format($item->price, 2) }} ${{ number_format($item->subtotal, 2) }}
Total: ${{ number_format($order->total_amount, 2) }}
Shipping Address

{{ $order->shipping_address }}

Billing Address

{{ $order->billing_address }}

Payment Status
@if(!$order->payment_receipt_path) @else
Payment Method: {{ $order->payment_method === 'mcb' ? 'MCB IBAN' : ucfirst($order->payment_method) }}
Status: @if($order->payment_status === 'pending') Pending Confirmation @elseif($order->payment_status === 'confirmed') Confirmed @elseif($order->payment_status === 'rejected') Rejected @endif
@if($order->payment_receipt_path) @endif @endif
Track Order
@if(!$order->payment_receipt_path || $order->payment_status === 'rejected') @endif @endsection