Initial dev export (exclude uploads/runtime)
This commit is contained in:
45
plugins/store/orders.php
Normal file
45
plugins/store/orders.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
$pageTitle = $title ?? 'Store Orders';
|
||||
$orders = $orders ?? [];
|
||||
ob_start();
|
||||
?>
|
||||
<section class="admin-card">
|
||||
<div class="badge">Store</div>
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;">
|
||||
<div>
|
||||
<h1 style="font-size:28px; margin:0;">Orders</h1>
|
||||
<p style="color: var(--muted); margin-top:6px;">Order queue and payment status.</p>
|
||||
</div>
|
||||
<a href="/admin/store" class="btn outline">Back</a>
|
||||
</div>
|
||||
<div style="display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;">
|
||||
<a href="/admin/store" class="btn outline small">Overview</a>
|
||||
<a href="/admin/store/settings" class="btn outline small">Settings</a>
|
||||
<a href="/admin/store/orders" class="btn outline small">Orders</a>
|
||||
<a href="/admin/store/customers" class="btn outline small">Customers</a>
|
||||
</div>
|
||||
|
||||
<?php if (!$orders): ?>
|
||||
<div style="margin-top:16px; color:var(--muted); font-size:13px;">No orders yet.</div>
|
||||
<?php else: ?>
|
||||
<div style="margin-top:16px; display:grid; gap:10px;">
|
||||
<?php foreach ($orders as $order): ?>
|
||||
<div class="admin-card" style="padding:14px; display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:10px; align-items:center;">
|
||||
<div>
|
||||
<div style="font-weight:600;"><?= htmlspecialchars((string)($order['order_no'] ?? ('#' . (int)($order['id'] ?? 0))), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div style="font-size:12px; color:var(--muted); margin-top:2px;"><?= htmlspecialchars((string)($order['email'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
</div>
|
||||
<div class="pill"><?= htmlspecialchars((string)($order['status'] ?? 'pending'), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div style="font-size:13px; color:var(--text);">
|
||||
<?= htmlspecialchars((string)($order['currency'] ?? 'GBP'), ENT_QUOTES, 'UTF-8') ?>
|
||||
<?= number_format((float)($order['total'] ?? 0), 2) ?>
|
||||
</div>
|
||||
<div style="font-size:12px; color:var(--muted);"><?= htmlspecialchars((string)($order['created_at'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
require __DIR__ . '/../../../../modules/admin/views/layout.php';
|
||||
Reference in New Issue
Block a user