@extends('layouts.master') @section('title', 'Check Out List') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.header') @include('layouts.title')
@yield('title')

@foreach ($products as $i => $item) @endforeach
No. Image Name Status Quantity Unit Price (THB) Total Price (THB) Actions
{{ ++$i }} @if ($item->product_image) Product Image
@if ($item->product_type === '7') Premium @endif @else No Image @endif
{{ $item->product_name }} @if ($item->product_type == '7') @php $statusAdmin = strtolower(trim($order->order_status_for_admin ?? 'pending')); @endphp @if ($statusAdmin === 'approved') Approved @elseif ($statusAdmin === 'pending') Pending Approval @elseif ($statusAdmin === 'rejected') Rejected @else - @endif @else - @endif {{ $item->quantity }} {{ number_format($item->product_price, 2) }} {{ number_format($item->quantity * $item->product_price, 2) }} @if ($item->item_status === 'rejected') {{-- ปุ่มลบ --}}
@csrf @method('DELETE')
@endif
Quantity: {{ $totalQty }} Total Price: {{ number_format($total, 2) }}
@php $hasPremiumProduct = false; foreach ($products as $item) { if ($item->product_type == '7') { $hasPremiumProduct = true; break; } } $adminApproved = strtolower(trim($order->order_status_for_admin)) === 'approved'; @endphp
@if (!$hasPremiumProduct || ($hasPremiumProduct && $adminApproved)) {{-- ไม่มี premium หรือ premium ได้อนุมัติแล้ว --}}
@csrf
@else {{-- มีสินค้า premium แต่ admin ไม่อนุมัติ --}} @endif Cancel

Free Shipping

Duis mollis gravida commodo id luctus erat porttitor ligula, eget lacinia odio sem.

30 Days Return

Duis mollis gravida commodo id luctus erat porttitor ligula, eget lacinia odio sem.

2-Years Warranty

Duis mollis gravida commodo id luctus erat porttitor ligula, eget lacinia odio sem.

@include('layouts.footer') @endsection