@extends('layouts.admin-layout') @section('title', 'Order Details') @section('content')
{{--

Order #{{ $order->id }} Details

--}}

Order Details

Customer: {{ $order->first_name && $order->last_name ? ($order->first_name . ' ' . $order->last_name) : 'Guest' }}

@php $discount = $order->discount ?? 0; $subtotal = $order->total_price + $discount; $shipping = $order->shipping_amount ?? 0; $finalTotal = $subtotal + $shipping - $discount; @endphp

Country: {{ $order->country ?? '' }}

City: {{ $order->city ?? '' }}

Address: {{ $order->shipping_address ?? '' }}

Phone: {{ $order->phone_number ?? '' }}

Province Code: {{ $order->pro_code ?? '' }}

ZIP/Postal Code: {{ $order->zip_code ?? '' }}



Sub Total: ${{ number_format($subtotal, 2) }}

@if($discount > 0)

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

@endif @if($shipping > 0)

Shipping Amount: ${{ number_format($shipping, 2) }}

@endif

Total: ${{ number_format($finalTotal, 2) }}

@foreach($order->items as $item) @if($item->color == 'Select Color') @else @endif @endforeach
Item Name Quantity Size Color Price Payment Status Subtotal
{{ $item->product->product_name ?? '-' }} {{ $item->quantity ?? '-' }} {{ $item->size ?? '-' }}{{ 'No Color' }}{{ $item->color ?? '-' }}${{ number_format($item->price, 2) ?? '-'}} @if ($order->status == 1) Payment Successful @else Unpaid @endif ${{ number_format($item->quantity * $item->price, 2) ?? '-'}}
@endsection