@extends('frontend.main_master') @section('body-class', 'panel-page panel-scrollable') @section('title', 'Sipariş Detayı | ' . t('site-title')) @push('styles') @endpush @section('content') @php($detail = $order->storeOrderDetail)
Siparişlerim @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

{{ $order->invoice_number ?? ('Sipariş #' . $order->id) }}

{{ $order->created_at->format('d.m.Y H:i') }}
{{ $detail->statusLabel() }}
@if ($detail->tracking_number)
Kargo Takip

{{ $detail->carrier ?? 'Kargo firması' }} — Takip No: {{ $detail->tracking_number }}

@endif
Ürünler
@foreach ($order->items as $item)
{{ $item->product_name }} @if ($item->variant_attributes)
@foreach ($item->variant_attributes as $key => $value) {{ ucfirst($key) }}: {{ $value }}@if(!$loop->last), @endif @endforeach
@endif
{{ $item->quantity }} adet × {{ number_format($item->unit_price, 2, ',', '.') }} ₺
{{ number_format($item->line_total, 2, ',', '.') }} ₺
@if ($detail->fulfillment_status === 'delivered') @php($existingReturn = $item->returns->firstWhere('status', '!=', 'rejected')) @if ($existingReturn) İade: {{ $existingReturn->status }} @else @endif @endif
@if ($detail->fulfillment_status === 'delivered' && !($item->returns->firstWhere('status', '!=', 'rejected'))) @endif @endforeach
Kargo Adresi

{{ $detail->ship_recipient_name }} — {{ $detail->ship_phone }}

{{ $detail->ship_address_line }}

{{ $detail->ship_district }} / {{ $detail->ship_city }} {{ $detail->ship_postal_code }} — {{ $detail->ship_country }}

Ara Toplam{{ number_format($order->subtotal, 2, ',', '.') }} ₺
Kargo Ücreti{{ number_format($detail->shipping_fee, 2, ',', '.') }} ₺
@if ($order->discount_amount > 0)
İndirim-{{ number_format($order->discount_amount, 2, ',', '.') }} ₺
@endif
Toplam{{ number_format($order->total, 2, ',', '.') }} ₺
@endsection