Storefront
The built-in customer storefront for OTC shopping, order tracking, refills, and patient requests.
The built-in storefront lives under app/(storefront)/(main)/ and is served at /. It resolves the pharmacy from the request host (storefrontKey, storefrontHost, or slug). Its route table is on External storefronts.
Customer journeys
Shop OTC products
- Pick a location on
/. The page shows its hours and counter services. - Browse
/productswith the?category=track and search./products/[handle]shows related products from the same category. - Add to cart. The location locks once the cart has items.
Check out
/checkout collects contact details, pickup or delivery (with an address), payment choice, and privacy consent. Pay at pickup is hidden for delivery. The card step appears when Stripe is installed and NEXT_PUBLIC_STRIPE_KEY is set. A successful guest order returns a guestOrderToken.
Track an order
/order-status looks up by order number and email, or opens with orderId and the guest token. Signed-in customers see orders at /account and /account/orders/details/[id].
Refill, transfer, or register
/prescriptions explains the options. Refills are requested from /account for linked patients. Transfer and new-prescription requests need sign-in. Registration requests collect name, date of birth, phone, email, allergies, and insurance. History is on the account page.
Account
/account has sign in, register (registerPharmacyCustomer), and reset at /account/reset. /account/profile edits name, email, and password through updateActiveUser, which checks the current password.
What the catalog shows
Only published products with prescriptionRequirement none and onlineAvailable on. If a location has online ordering off, the storefront shows a call-to-order notice.
Staff view
Staff process what customers send in the Orders, Refills and requests, and Patients pages. Set branding in Store settings.