<%- include('partials/layout-start') %>

Заказ #<%= order.id %>

<% if (success) { %>

Заказ успешно оформлен! Мы свяжемся с вами по email.

<% } %>
<% const statusLabels = { pending: 'Ожидает обработки', paid: 'Оплачен', shipped: 'Отправлен', cancelled: 'Отменён' }; %>

Статус: <%= statusLabels[order.status] || order.status %>

Дата: <%= new Date(order.created_at).toLocaleString('ru-RU') %>

Доставка: <%= order.address %>

Контакт: <%= order.customer_name %>, <%= order.customer_email %><% if (order.customer_phone) { %>, <%= order.customer_phone %><% } %>

Состав заказа

<% const subtotal = order.subtotal_cents != null ? order.subtotal_cents : order.total_cents; %> <% if (order.discount_cents > 0) { %>
Товары
<%= formatPrice(subtotal) %>
Скидка
−<%= formatPrice(order.discount_cents) %>
<% } %> <% if (order.loyalty_points_earned > 0) { %>

Начислено баллов лояльности: +<%= order.loyalty_points_earned %>

<% } %>

К оплате: <%= formatPrice(order.total_cents) %>

← Все заказы

<%- include('partials/layout-end') %>