first commit

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-16 20:52:15 +03:00
parent 3419d90e61
commit 323e0a2926
67 changed files with 1723 additions and 3077 deletions
+30
View File
@@ -0,0 +1,30 @@
<%- include('partials/layout-start') %>
<h1>Заказ #<%= order.id %></h1>
<% if (success) { %>
<p class="alert alert--success">Заказ успешно оформлен! Мы свяжемся с вами по email.</p>
<% } %>
<div class="card order-card">
<% const statusLabels = { pending: 'Ожидает обработки', paid: 'Оплачен', shipped: 'Отправлен', cancelled: 'Отменён' }; %>
<p><strong>Статус:</strong> <span class="status status--<%= order.status %>"><%= statusLabels[order.status] || order.status %></span></p>
<p><strong>Дата:</strong> <%= new Date(order.created_at).toLocaleString('ru-RU') %></p>
<p><strong>Доставка:</strong> <%= order.address %></p>
<p><strong>Контакт:</strong> <%= order.customer_name %>, <%= order.customer_email %><% if (order.customer_phone) { %>, <%= order.customer_phone %><% } %></p>
<h2>Состав заказа</h2>
<ul class="checkout-list">
<% items.forEach(item => { %>
<li>
<span><a href="/product/<%= item.slug %>"><%= item.name %></a> × <%= item.quantity %></span>
<span><%= formatPrice(item.price_cents * item.quantity) %></span>
</li>
<% }) %>
</ul>
<p class="checkout-total">Итого: <strong><%= formatPrice(order.total_cents) %></strong></p>
</div>
<p><a href="/orders" class="link-back">← Все заказы</a></p>
<%- include('partials/layout-end') %>