Files
order/views/store/cart.php
T
Ty Clifford b14f4c1796 - Implemented the Lakeside Orders demo rebrand:
New licensed lake, picnic, dining, server, burger, and food photography.
Rebuilt homepage gallery, logo, colors, copy, menu, specials, and 
exports.
Added dashboard-configurable branding in [settings.php (line 
18)](/Users/tyemeclifford/Documents/GH/fatbottomgrille/views/admin/settings.php:18).
Added a public attribution page and full [image 
credits](/Users/tyemeclifford/Documents/GH/fatbottomgrille/public/assets/images/CREDITS.md).
Migrated existing SQLite menu data and admin email to 
admin@lakesideorders.test.
Verified 51 PHP files, JSON/JavaScript, storefront pages, database 
migration, admin settings, and menu PDF. All passed.
2026-06-14 14:26:09 -04:00

58 lines
3.2 KiB
PHP

<section class="page-hero page-hero-compact">
<div class="container">
<span class="eyebrow">Almost yours</span>
<h1>Your Order</h1>
</div>
</section>
<div class="container checkout-layout section">
<section class="checkout-main">
<?php if (empty($cart['items'])): ?>
<div class="empty-state">
<h2>Your order is wide open.</h2>
<p>Start with a burger, a burrito, or whatever sounds good right now.</p>
<a class="button" href="<?= e(url('/menu')) ?>">Browse the Menu</a>
</div>
<?php else: ?>
<form action="<?= e(url('/cart/update')) ?>" method="post">
<?= csrf_field() ?>
<div class="cart-list">
<?php foreach ($cart['items'] as $item): ?>
<article class="cart-item">
<div class="cart-item-mark"><?= e(strtoupper(substr((string) $item['name'], 0, 2))) ?></div>
<div class="cart-item-copy">
<h2><?= e($item['name']) ?></h2>
<?php if ($item['notes']): ?><p>Note: <?= e($item['notes']) ?></p><?php endif; ?>
<span><?= money($item['unit_price_cents']) ?> each</span>
</div>
<label class="quantity-field">
<span>Qty</span>
<input type="number" min="0" max="20" name="quantity[<?= (int) $item['id'] ?>]" value="<?= (int) $item['quantity'] ?>">
</label>
<strong class="cart-line-total"><?= money((int) $item['quantity'] * (int) $item['unit_price_cents']) ?></strong>
<button class="icon-button remove-cart-item" type="submit" formaction="<?= e(url('/cart/remove')) ?>" name="cart_item_id" value="<?= (int) $item['id'] ?>" aria-label="Remove <?= e($item['name']) ?>">&times;</button>
</article>
<?php endforeach; ?>
</div>
<div class="cart-actions">
<a class="text-link" href="<?= e(url('/menu')) ?>">Add More Items</a>
<button class="button button-outline" type="submit">Update Order</button>
</div>
</form>
<?php endif; ?>
</section>
<?php if (!empty($cart['items'])): ?>
<aside class="order-summary">
<span class="eyebrow">Pickup summary</span>
<h2><?= (int) $cart['item_count'] ?> <?= (int) $cart['item_count'] === 1 ? 'item' : 'items' ?></h2>
<dl>
<div><dt>Subtotal</dt><dd><?= money($totals['subtotal_cents']) ?></dd></div>
<div><dt>Estimated tax</dt><dd><?= money($totals['tax_cents']) ?></dd></div>
<div class="summary-total"><dt>Total</dt><dd><?= money($totals['total_cents']) ?></dd></div>
</dl>
<a class="button button-block button-large" href="<?= e(url('/checkout')) ?>">Continue to Checkout</a>
<p class="summary-note">Pickup at <?= e($config->get('business.street')) ?>, <?= e($config->get('business.city')) ?>.</p>
</aside>
<?php endif; ?>
</div>