

<?php $__env->startSection('title', 'Checkout'); ?>

<?php $__env->startSection('content'); ?>
<div class="container mt-4">
    <h2>🛒 Checkout</h2>

    <table class="table table-bordered">
        <thead>
            <tr>
                <th>Pizza</th>
                <th>Jumlah</th>
                <th>Harga (Satuan)</th>
                <th>Total Harga</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $cartItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($item->pizza->nama); ?></td>
                    <td><?php echo e($item->jumlah); ?></td>
                    <td>Rp <?php echo e(number_format($item->pizza->harga,0,',','.')); ?></td>
                    <td>Rp <?php echo e(number_format($item->jumlah * $item->pizza->harga,0,',','.')); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>

    <h4>Total Belanja: Rp <?php echo e(number_format($total,0,',','.')); ?></h4>

    <form action="<?php echo e(route('user.checkout.process')); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <div class="mb-3">
            <label>Nama Penerima</label>
            <input type="text" name="nama_pelanggan" class="form-control" required>
        </div>
        <div class="mb-3">
            <label>Alamat</label>
            <textarea name="alamat" class="form-control" required></textarea>
        </div>
        <div class="mb-3">
            <label>Metode Pembayaran</label>
            <select name="metode_pembayaran" class="form-control" required>
                <option value="cod">COD</option>
                <option value="qris">QRIS</option>
            </select>
        </div>
        <button type="submit" class="btn btn-success">Konfirmasi Pesanan</button>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.user', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\pizza_queen_app\resources\views/user/checkout/index.blade.php ENDPATH**/ ?>