@extends('layouts.app') @section('content')

Track Shipments

Track your shipments by order number

Order Tracking

Track shipments by entering an order number

@csrf
Bulk Shipping

Upload CSV file to process multiple shipments

@csrf
@if(isset($order) && isset($shipments))
Shipments for Order #{{ $order->external_order_id }}
{{ count($shipments) }} Shipment(s)
@forelse($shipments as $shipment) @php $tracking_number = $shipment->tracking_number ?: 'N/A'; $date_shipped = $shipment->date_shipped ? \Carbon\Carbon::parse($shipment->date_shipped)->format('M j, g:i a') : 'N/A'; // Determine shipment status $status = 'pending'; $statusClass = 'bg-secondary'; $statusText = 'Pending'; if ($shipment->date_delivery) { $status = 'delivered'; $statusClass = 'bg-success'; $statusText = 'Delivered'; } elseif ($shipment->date_shipped) { $status = 'shipped'; $statusClass = 'bg-info'; $statusText = 'Shipped'; } elseif ($shipment->tracking_number) { $status = 'label_created'; $statusClass = 'bg-warning'; $statusText = 'Label Created'; } @endphp @empty @endforelse
Order / Shipment Customer Shipping Address Carrier Method Warehouse Tracking # Submitted Shipped Actions
{{ $order->external_order_id }} #{{ $shipment->external_shipment_id ?: $shipment->shipment_id }}
{{ !empty($order->shipping_company) ? $order->shipping_company : $order->shipping_name }}
@if(!empty($order->shipping_email)) {{ $order->shipping_email }} @endif
{{ $order->shipping_street_address }}
{{ $order->shipping_city }}, {{ $order->shipping_state }} {{ $order->shipping_zip }}
{{ $order->shipping_country }}
@if($shipment->carrier) {{ strtoupper($shipment->carrier) }} @else - @endif {{ $shipment->shipment_method ?: '-' }} {{ $shipment->warehouse_id }} @if($tracking_number !== 'N/A')
{{ $tracking_number }} {{ $statusText }}
@else {{ $tracking_number }} @endif
{{ \Carbon\Carbon::parse($shipment->date_submitted)->format('M j, g:i a') }} {{ $date_shipped }}
@if($shipment->tracking_number && $shipment->carrier) @php $trackingUrl = '#'; $carrier = strtolower($shipment->carrier); $tracking = $shipment->tracking_number; $trackingUrls = [ 'ups' => "https://www.ups.com/track?tracknum={$tracking}", 'fedex' => "https://www.fedex.com/fedextrack/?tracknumbers={$tracking}", 'usps' => "https://tools.usps.com/go/TrackConfirmAction?tLabels={$tracking}", 'stamps_com' => "https://tools.usps.com/go/TrackConfirmAction?tLabels={$tracking}", 'dhl_express' => "https://www.dhl.com/en/express/tracking.html?AWB={$tracking}", 'amazon_shipping' => "https://track.amazon.com/tracking/{$tracking}", 'amazon_shipping_us' => "https://track.amazon.com/tracking/{$tracking}" ]; $trackingUrl = $trackingUrls[$carrier] ?? '#'; @endphp @endif @if(!$shipment->date_shipped) @endif

No shipments found for this order

@else
Track Your Shipments

Enter an order number above to view shipment details

@endif
@endsection @section('scripts') @endsection