@extends('layouts.customer') @section('title') Order History @endsection @section('content')




Back @if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Order History

@foreach ($orders as $order)
Tracking Number Total Price Rider Status Action Report
{{ $order->tracking_no }} @php $grandTotal = 0; @endphp @foreach ($order->orderItems as $item) @if ($item->status == 0) @php $activePrice = $item->product->product_prices->where('is_active', 1)->first(); $originalPrice = $activePrice ? $activePrice->price : 0; $subtotal = $originalPrice * $item->qty; $grandTotal += $subtotal; @endphp @endif @endforeach {{-- Add 60 if delivery_option is 2 --}} @if ($order->delivery_option == 2) @php $grandTotal += 60; @endphp @endif ₱{{ number_format($grandTotal, 2, '.', ',') }}
Fatal error: Uncaught Error: Class "App\Models\User" not found in D:\InetPub\vhosts\cmu-online.tech\janndhellemarthzulueta.cmu-online.tech\CLICKSHOP\resources\views\frontend\orders\completedOrder.blade.php:81 Stack trace: #0 {main} thrown in D:\InetPub\vhosts\cmu-online.tech\janndhellemarthzulueta.cmu-online.tech\CLICKSHOP\resources\views\frontend\orders\completedOrder.blade.php on line 81