- Implemented the full Fat Bottom Grille storefront and staff dashboard.
Highlights include configurable menus, specials, cart/checkout, taxes, customer accounts with email 2FA, newsletters, analytics, refunds, PDF/CSV exports, Square/Mailgun adapters, and optional MySQL migration. See README.md for setup and production configuration. Verified PHP/JavaScript syntax, responsive layouts, registration, 2FA, checkout, dashboard workflows, settings persistence, and PDF generation. Real Square, Mailgun, and MySQL connections require credentials/server access. Square implementation follows the official Payments API and Refunds API.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<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="/menu">Browse the Menu</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<form action="/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="/cart/remove" name="cart_item_id" value="<?= (int) $item['id'] ?>" aria-label="Remove <?= e($item['name']) ?>">×</button>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="cart-actions">
|
||||
<a class="text-link" href="/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="/checkout">Continue to Checkout</a>
|
||||
<p class="summary-note">Pickup at 410 W Piedmont St, Keyser.</p>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user