- Implemented the full order lifecycle, secure customer tracker, automatic acceptance emails, configurable status templates, and guest/account CRM management.

Key areas: 
[OrderStatusService.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Services/OrderStatusService.php), 
[AdminController.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Controllers/AdminController.php), 
and 
[Database.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Core/Database.php).
SQLite migration applied successfully. PHP/JS syntax, integration 
workflows, rendered pages, database integrity, and tracker authorization 
all passed. Invalid tracker tokens correctly return 403.
This commit is contained in:
Ty Clifford
2026-06-14 13:35:31 -04:00
parent 3417589a7c
commit 03348cad79
24 changed files with 1218 additions and 72 deletions
+27
View File
@@ -44,6 +44,33 @@
</div>
<label class="check-control"><input type="checkbox" name="mailgun[enabled]" value="1" <?= checked($config->get('mailgun.enabled')) ?>><span><strong>Enable Mailgun delivery</strong></span></label>
</section>
<section class="admin-panel">
<div class="admin-panel-heading"><div><span class="eyebrow">Customer notifications</span><h2>Order Status Email Templates</h2></div></div>
<div class="notice">
Available placeholders: <code>{{customer_name}}</code>, <code>{{order_number}}</code>,
<code>{{status_label}}</code>, <code>{{note}}</code>, <code>{{rejection_reason}}</code>,
<code>{{tracking_url}}</code>, and <code>{{business_name}}</code>.
</div>
<div class="email-template-list">
<?php foreach (['pending', 'accepted', 'declined', 'processing', 'ready', 'completed'] as $emailStatus): ?>
<details <?= $emailStatus === 'accepted' ? 'open' : '' ?>>
<summary>
<strong><?= e(order_status_label($emailStatus)) ?></strong>
<span><?= $emailStatus === 'pending' ? 'Order receipt' : 'Status update' ?></span>
</summary>
<div class="inline-editor form-stack">
<label>Subject
<input type="text" name="order_emails[<?= e($emailStatus) ?>][subject]" required
value="<?= e($config->get('order_emails.' . $emailStatus . '.subject')) ?>">
</label>
<label>Message
<textarea name="order_emails[<?= e($emailStatus) ?>][body]" rows="6" required><?= e($config->get('order_emails.' . $emailStatus . '.body')) ?></textarea>
</label>
</div>
</details>
<?php endforeach; ?>
</div>
</section>
<section class="admin-panel">
<div class="admin-panel-heading"><div><span class="eyebrow">Optional database server</span><h2>MySQL / MariaDB Connection</h2></div></div>
<div class="notice">These values are only used by the migration tool below. The application continues using SQLite unless a migration succeeds and you explicitly switch drivers.</div>