@extends('frontend.layouts.app' ,['title' => 'TSG Breeze offers elegant and trendy ladies fashion, featuring stylish outfits, accessories, and timeless essentials for the modern woman']) @section('content')
@include('frontend.layouts.sidebar')
@if ($orders->isNotEmpty()) @foreach ($orders as $order) {{-- Shipping Address Row --}}
{{-- @dd($order->address) --}} {{ $order->address->receiver_name }},
{{ $order->address->receiver_email }},
{{ $order->address->receiver_phone }} {{ $order->address->alternate_phone }},
{{ $order->address->landmark }}, {{ $order->address->house_no }} {{ $order->address->society }} {{ $order->address->city }} {{ $order->address->state }}, {{ $order->address->pincode }},
@if ($order->order_status == 'Completed') @endif
Order Id:
{{ $order->cart_id }}
Order Date:
{{ $order->order_date }}
{{--
Order Status:
{{ $order->order_status }}
--}}
Payment Status:
{{ $order->payment_status }}
Payment Method:
{{ $order->payment_method }}
@if ($order->orderItems->isNotEmpty()) @php $total = 0; @endphp {{-- Order Items Row --}}
@foreach ($order->orderItems as $item)
    {{-- Product Image --}}
  • {{ $item->product_name }}
  • {{-- Product Info --}}
  • {{ $item->product_name }}

    @php $mrp = $item->variation->mrp; $price = $item->variation->price; $percentOff = $mrp > 0 && $price > 0 ? round((($mrp - $price) / $mrp) * 100) : 0; @endphp @if ($mrp != $price && $mrp != 0) {{ $percentOff }}% off MRP₹{{ $mrp }} @endif ₹{{ $price }}
    @if ($item->variation->variation_attributes->isNotEmpty())

    {{ $item->variation->variation_attributes->map(function ($attribute) { return $attribute->attribute->attribute->name . ': ' . $attribute->attribute->name; })->implode(', ') }}

    @endif
    {{ $item->quantity }} Item{{ $item->quantity > 1 ? 's' : '' }}: ₹{{ $item->variation->price * $item->quantity }}
@php $total += $item->variation->price * $item->quantity; @endphp @endforeach {{-- ✅ Total AFTER the loop --}}
Sub Toatal : ₹{{ $total }}
Applied Coupon : -₹{{ $order->coupon_discount }} @if ( $order->coupon) ({{ $order->coupon->coupon_name?? '' }}) @endif
Total: ₹{{ $order->total_price }}
@endif
@endforeach @else

No Orders Found

You haven't placed any orders yet. Start shopping to see your orders here!

@endif
@push('scripts') {!! JsValidator::formRequest('App\Http\Requests\Frontend\Profile\ProfileUpdateRequest', '#profile-update-form') !!} @endpush @endsection