@extends('layouts.frontend') @section('title', 'অর্ডার ট্র্যাক করুন - ' . \App\Models\Setting::get('site_name', config('app.name'))) @section('content')

📦 অর্ডার ট্র্যাক করুন

@if(session('error'))
{{ session('error') }}
@endif
@csrf
@error('order_id')

{{ $message }}

@enderror
@error('phone')

{{ $message }}

@enderror
@isset($order)

অর্ডার #{{ $order->id }}

@switch($order->status) @case('pending') পেন্ডিং @break @case('confirmed') কনফার্মড @break @case('processing') প্রসেসিং @break @case('shipped') শিপড @break @case('delivered') ডেলিভারড @break @case('cancelled') বাতিল @break @default {{ ucfirst($order->status) }} @endswitch
@php $statuses = ['pending', 'confirmed', 'processing', 'shipped', 'delivered']; $currentIndex = array_search($order->status, $statuses); if ($order->status === 'cancelled') $currentIndex = -1; @endphp @foreach(['পেন্ডিং', 'কনফার্মড', 'প্রসেসিং', 'শিপড', 'ডেলিভারড'] as $index => $statusLabel)
@if($index <= $currentIndex) @else {{ $index + 1 }} @endif
{{ $statusLabel }}
@endforeach

শিপিং তথ্য

নাম: {{ $order->shipping_name }}

ফোন: {{ $order->shipping_phone }}

ঠিকানা: {{ $order->shipping_address }}, {{ $order->shipping_area }}, {{ $order->shipping_district }}

অর্ডার তথ্য

তারিখ: {{ $order->created_at->format('d M, Y h:i A') }}

পেমেন্ট: {{ $order->payment_method === 'cod' ? 'ক্যাশ অন ডেলিভারি' : ucfirst($order->payment_method) }}

@if($order->tracking_number)

ট্র্যাকিং নম্বর: {{ $order->tracking_number }}

@endif

অর্ডার আইটেম

@foreach($order->items as $item)
@if($item->product && $item->product->image) {{ $item->product_name }} @else
@endif

{{ $item->product_name }}

{{ $item->quantity }}x ৳{{ number_format($item->price, 0) }}

@if($item->color || $item->size)

@if($item->color) রঙ: {{ $item->color }} @endif @if($item->size) সাইজ: {{ $item->size }} @endif

@endif
৳{{ number_format($item->price * $item->quantity, 0) }}
@endforeach
সাবটোটাল ৳{{ number_format($order->subtotal, 0) }}
@if($order->discount > 0)
ডিসকাউন্ট -৳{{ number_format($order->discount, 0) }}
@endif
ডেলিভারি চার্জ ৳{{ number_format($order->shipping_charge, 0) }}
সর্বমোট ৳{{ number_format($order->total, 0) }}
@endisset
@endsection