@extends('layouts.app') @section('content') @include('account.dealer.show.menu') {{-- --}} @if($order_query->status=="PROCESSING") In Progress @elseif($order_query->status=="OUT FOR DELIVERY") Out for Develiry @elseif($order_query->status=="DELIVERED") Delivered @else @endif Order #{{$order_query->reference}} Item {{$order_query->items[0]->product_details->name}} Start Time {{date('d F Y, H:i:s',strtotime($order_query->created_at))}} Address {{$order_query->shipping_details->address_1.", ".$order_query->shipping_details->address_2.", ".$order_query->shipping_details->barangay.", ". $order_query->shipping_details->city.", ".$order_query->shipping_details->province}} Order History Item Details Courier Receiver {{-- PROCESSING {{ $order_query->status == 'PROCESSING' ? $order_query->created_at : (($order_query->status == "OUT FOR DELIVERY" || $order_query->status == "DELIVERED") ? $order_query->created_at : 'PENDING')}} OUT FOR DELIVERY {{ $order_query->status == 'OUT FOR DELIVERY' ? $order_query->created_at : (($order_query->status == "DELIVERED") ? $order_query->created_at : 'PENDING')}} DELIVERED {{ $order_query->status == 'DELIVERED' ? $order_query->created_at : 'PENDING'}} --}} @if(!empty($order_query->shipment?->tracking)) @foreach($order_query->shipment->tracking as $key => $track) {{$track->status}} {{date('m/d/Y h:i a',strtotime($track->created_at))}} {{$track->details}} @if(!empty($track->location)) Location : {{$track->location}} @endif @endforeach @endif @if ($order_query->shipping_method == "PICKUP") @php $statuses = [ 'DELIVERED' => ['ORDER RECEIVED.', 'Your order has been received.'], 'READY FOR PICKUP' => ['READY FOR PICKUP.', 'Your order is ready to pickup.'], 'PROCESSING' => ['PROCESSING.', 'Your order has been processing.'] ]; $show = match($order_query->status) { 'DELIVERED' => ['DELIVERED', 'READY FOR PICKUP', 'PROCESSING'], 'READY FOR PICKUP' => ['READY FOR PICKUP', 'PROCESSING'], 'PROCESSING' => ['PROCESSING'], default => [] }; @endphp @foreach ($statuses as $key => [$title, $desc]) @if (in_array($key, $show)) {{ $title }} {{ date('m/d/Y h:i a', strtotime($order_query->updated_at)) }} {{ $desc }} @endif @endforeach @endif YOUR ORDER HAS BEEN PLACED. {{date('m/d/Y h:i a',strtotime($order_query->created_at))}} Your order has been successfully placed. {{-- @forelse($order_query->shipment->tracking??[] as $key => $track) {{$track->status}} {{date('m/d/Y h:i a',strtotime($track->created_at))}} {{$track->details}} @if(!empty($track->location)) Location : {{$track->location}} @endif @empty @endforelse --}} @foreach($order_query->items as $item) {{$item->product_details->name}} Price : ₱{{number_format($item->product_price,2)}} Quantity : {{number_format($item->product_quantity,0)}} Subtotal : ₱{{number_format($item->total_price,2)}} @endforeach Total Price ₱{{number_format($order_query->amount,2)}} Courier Name : {{$order_query->shipment->courier->name??''}} Tracking Number : {{$order_query->shipment->tracking_number ?? 'PROCESSING'}} {{--Thank you Your order has been received--}} Receiver Name : {{$order_query->shipping_details->firstname." ".$order_query->shipping_details->surname}} Order Number : {{$order_query->reference}} Date : {{date("d/m/y, h:i a",strtotime($order_query->created_at))}} Total : ₱{{number_format($order_query->amount,2)}} Payment Method : {{$order_query->shop_payment_methods_name}}
{{$track->details}}
Location : {{$track->location}}
{{ $desc }}
Your order has been successfully placed.
{{date('m/d/Y h:i a',strtotime($track->created_at))}}
Thank you Your order has been received