2026-02-13 16:02:25 +00:00
|
|
|
<.shop_layout {layout_assigns(assigns)} active_page="checkout">
|
2026-02-17 09:03:35 +00:00
|
|
|
<main id="main-content" class="page-container checkout-main">
|
2026-02-07 08:30:17 +00:00
|
|
|
<%= if @order && @order.payment_status == "paid" do %>
|
2026-02-17 09:03:35 +00:00
|
|
|
<div class="checkout-header">
|
|
|
|
|
<div class="checkout-icon">
|
2026-02-07 08:30:17 +00:00
|
|
|
<svg
|
2026-02-17 09:03:35 +00:00
|
|
|
width="32"
|
|
|
|
|
height="32"
|
2026-02-07 08:30:17 +00:00
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
stroke-width="2.5"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
>
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<h1 class="checkout-heading">
|
2026-02-07 08:30:17 +00:00
|
|
|
Thank you for your order
|
|
|
|
|
</h1>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-meta">
|
2026-02-17 08:01:32 +00:00
|
|
|
Order <strong>{@order.order_number}</strong>
|
2026-02-07 08:30:17 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<%= if @order.customer_email do %>
|
2026-02-17 08:01:32 +00:00
|
|
|
<p class="checkout-meta">
|
2026-02-07 08:30:17 +00:00
|
|
|
A confirmation will be sent to <strong>{@order.customer_email}</strong>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<.shop_card class="checkout-card">
|
|
|
|
|
<h2 class="checkout-heading">
|
2026-02-07 08:30:17 +00:00
|
|
|
Order details
|
|
|
|
|
</h2>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<ul class="checkout-items">
|
2026-02-07 08:30:17 +00:00
|
|
|
<%= for item <- @order.items do %>
|
2026-02-17 09:03:35 +00:00
|
|
|
<li class="checkout-item">
|
2026-02-07 08:30:17 +00:00
|
|
|
<div>
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-item-name">
|
2026-02-07 08:30:17 +00:00
|
|
|
{item.product_name}
|
|
|
|
|
</p>
|
|
|
|
|
<%= if item.variant_title do %>
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-item-detail">
|
2026-02-07 08:30:17 +00:00
|
|
|
{item.variant_title}
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-item-detail">
|
2026-02-07 08:30:17 +00:00
|
|
|
Qty: {item.quantity}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2026-02-17 09:03:35 +00:00
|
|
|
<span class="checkout-item-price">
|
2026-02-18 21:23:15 +00:00
|
|
|
{Berrypod.Cart.format_price(item.unit_price * item.quantity)}
|
2026-02-07 08:30:17 +00:00
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<div class="checkout-total-border">
|
|
|
|
|
<div class="checkout-total">
|
|
|
|
|
<span class="checkout-total-label">Total</span>
|
|
|
|
|
<span class="checkout-total-amount">
|
2026-02-18 21:23:15 +00:00
|
|
|
{Berrypod.Cart.format_price(@order.total)}
|
2026-02-07 08:30:17 +00:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</.shop_card>
|
|
|
|
|
|
|
|
|
|
<%= if @order.shipping_address != %{} do %>
|
2026-02-17 09:03:35 +00:00
|
|
|
<.shop_card class="checkout-card">
|
|
|
|
|
<h2 class="checkout-heading">
|
2026-02-07 08:30:17 +00:00
|
|
|
Shipping to
|
|
|
|
|
</h2>
|
2026-02-17 08:01:32 +00:00
|
|
|
<div class="checkout-shipping-address">
|
2026-02-07 08:30:17 +00:00
|
|
|
<p>{@order.shipping_address["name"]}</p>
|
|
|
|
|
<p>{@order.shipping_address["line1"]}</p>
|
|
|
|
|
<%= if @order.shipping_address["line2"] do %>
|
|
|
|
|
<p>{@order.shipping_address["line2"]}</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<p>
|
|
|
|
|
{@order.shipping_address["city"]}, {@order.shipping_address["postal_code"]}
|
|
|
|
|
</p>
|
|
|
|
|
<p>{@order.shipping_address["country"]}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</.shop_card>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<div class="checkout-actions">
|
|
|
|
|
<.shop_link_button href="/collections/all" class="checkout-cta">
|
2026-02-07 08:30:17 +00:00
|
|
|
Continue shopping
|
|
|
|
|
</.shop_link_button>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%!-- Payment pending or order not found --%>
|
2026-02-17 09:03:35 +00:00
|
|
|
<div class="checkout-header">
|
|
|
|
|
<div class="checkout-pending-icon">
|
2026-02-17 08:01:32 +00:00
|
|
|
<span class="checkout-pending-spinner">
|
2026-02-07 08:30:17 +00:00
|
|
|
<svg
|
2026-02-17 09:03:35 +00:00
|
|
|
width="32"
|
|
|
|
|
height="32"
|
2026-02-07 08:30:17 +00:00
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
|
stroke-width="1.5"
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<h1 class="checkout-heading">
|
2026-02-07 08:30:17 +00:00
|
|
|
Processing your payment
|
|
|
|
|
</h1>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-pending-text">
|
2026-02-07 08:30:17 +00:00
|
|
|
Please wait while we confirm your payment. This usually takes a few seconds.
|
|
|
|
|
</p>
|
|
|
|
|
|
2026-02-17 09:03:35 +00:00
|
|
|
<p class="checkout-pending-hint">
|
2026-02-11 14:46:12 +00:00
|
|
|
If this page doesn't update, please <.link
|
|
|
|
|
navigate="/contact"
|
2026-02-17 09:03:35 +00:00
|
|
|
class="checkout-contact-link"
|
2026-02-11 14:46:12 +00:00
|
|
|
>contact us</.link>.
|
2026-02-07 08:30:17 +00:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</main>
|
2026-02-08 12:10:08 +00:00
|
|
|
</.shop_layout>
|