add order status lookup for customers
All checks were successful
deploy / deploy (push) Successful in 1m17s
All checks were successful
deploy / deploy (push) Successful in 1m17s
Magic link flow on contact page: customer enters email, gets a time-limited signed link, clicks through to /orders showing all their paid orders and full detail pages with thumbnails and product links. - OrderLookupController generates/verifies Phoenix.Token signed links - Contact LiveView handles lookup_orders + reset_tracking events - Orders and OrderDetail LiveViews gated by session email - Order detail shows thumbnails, links to products still available - .themed-button gets base padding/font-weight so all usages are consistent - order-summary-card sticky scoped to .cart-grid (was leaking to orders list) - 27 new tests (1095 total) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,31 @@ defmodule Berrypod.Orders.OrderNotifier do
|
||||
deliver(order.customer_email, subject, body)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Sends a magic link for the customer to view their orders.
|
||||
|
||||
The link is time-limited (controlled by the caller's token expiry).
|
||||
"""
|
||||
def deliver_order_lookup(email, link) do
|
||||
subject = "Your order lookup link"
|
||||
|
||||
body = """
|
||||
==============================
|
||||
|
||||
Here's your link to view your orders:
|
||||
|
||||
#{link}
|
||||
|
||||
This link expires in 1 hour.
|
||||
|
||||
If you didn't request this, you can ignore this email.
|
||||
|
||||
==============================
|
||||
"""
|
||||
|
||||
deliver(email, subject, body)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Sends a shipping notification with tracking info.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user