@extends('layouts.horizontal', ['title' => 'Product Orders', 'topbarTitle' => 'Products Orders']) @section('css') @vite([ 'node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css', 'node_modules/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css', 'node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css', 'node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css', 'node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css', 'node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css', 'node_modules/select2/dist/css/select2.min.css']) @endsection @section('content')

Online Product Orders

@php $breadcrumb = getCurrentMenuBreadcrumb(); @endphp @if(!empty($breadcrumb)) @endif
Filter orders
@foreach ($onlineOrderLogs as $value) @php $orderPayload = $value->order_payload ? json_decode($value->order_payload, true) : []; $shippingAddress = $orderPayload['shipping_address'] ?? null; $billingAddress = $orderPayload['billing_address'] ?? $shippingAddress; $formatAddress = function($address) { if (!$address) return '-'; $parts = array_filter([ $address['address1'] ?? '', $address['city'] ?? '', $address['zip'] ?? '', $address['country'] ?? '' ]); return implode(', ', $parts) ?: '-'; }; $shippingFormatted = $formatAddress($shippingAddress); $billingFormatted = $formatAddress($billingAddress); @endphp @endforeach
Order ID Order Number Platform Customer Name Customer Email Customer Phone Shipping Address Status Created At Actions
{{ $value->order_id }} {{ $value->order_number }} {{ $value->platform }} {{ $value->customer_name }} {{ $value->customer_email }} {{ $value->customer_phone }} {{ $shippingFormatted }}

{{ str_replace('_', ' ', $value->status) }}

{{ $value->created_at }} @if ($value->status == 'sale_order_not_created') @endif
@endsection @section('scripts') @endsection