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

Checkout Pesanan

Ringkasan Pesanan

@foreach($items as $item) @php $variation = $item['variation'] ?? null; $variationText = ''; if (!empty($variation)) { $decoded = $variation; if (is_string($variation)) { $json = json_decode($variation, true); if (json_last_error() === JSON_ERROR_NONE && is_array($json)) { $decoded = $json; } } if (is_array($decoded)) { $parts = []; foreach ($decoded as $k => $v) { $parts[] = "$k: $v"; } $variationText = implode(', ', $parts); } else { $variationText = (string)$decoded; } } $imageUrl = null; $videoUrl = null; if ($item['product']->image) { $imageUrl = $item['product']->image; } elseif ($item['product']->video) { $videoUrl = $item['product']->video; } @endphp
@if($imageUrl) {{ $item['product']->name }} @elseif($item['product']->video) @else
@endif

{{ $item['product']->name }}

Qty: {{ $item['quantity'] }}

{{ \App\Models\Setting::get('currency_symbol', 'Rp') }} {{ number_format($item['subtotal'], 0, ',', '.') }}

@endforeach
Total {{ \App\Models\Setting::get('currency_symbol', 'Rp') }} {{ number_format($total, 0, ',', '.') }}

Data Penerima

@csrf @foreach($items as $index => $item) @php $variationValue = $item['variation'] ?? ''; if (is_array($variationValue)) { $variationValue = json_encode($variationValue); } @endphp @endforeach
@endsection