Developers
Start building
Themes/Theme SDK/Modules/customer

customer

The signed-in shopper: customer, addresses, orders, the account area and the sign-in forms.

On this page
import { … } from '@poltura/theme-sdk/customer';

Hooks

NameWhat it is
useCustomerThe signed-in shopper and the way out.
useAccountThe account area's shell: the shopper and the account navigation, including installed apps' and store features' pages.
useOrdersOne page of the signed-in shopper's order history, newest first.
useAddressesThe signed-in shopper's address book with the actions that change it.
useOrderOne of the signed-in shopper's orders.
useAuthFormThe state of a sign-in, registration or password form, for a theme that draws the form itself.
useEmailCodeStepThe state of the verify page, for a theme that draws the step of an emailed code itself.

Parts

NameWhat it is
AccountDeletionThe account deletion card: what deleting means and the button that asks for it after a confirmation dialog.
BusinessDetailsThe shopper's company details, tier and applications under their own heading; nothing for a consumer-only store and shopper.
EmailAddressThe shopper's sign-in email address; nothing until the shopper loads.
PasswordChangeThe shopper's password, changed in place or through an emailed link, and the passkeys that sign in without it.
PersonalInfoFormThe shopper's name and phone number, changed in place; nothing until the shopper loads.
AddressCardA saved address: personal or company, the recipient, the address lines, the phone and its default badges.
AddressFormThe address fields in the page language's name order, limited to the countries the store sells to, with a company tax id.
AccountNavThe account navigation as a grid of cards: an icon for the kind of page, its name and a line about it.
OrderCardAn order in a list: its number, status badge, date, product count, amount due, a preview of the products and a link to its page.
OrderCardSkeletonA placeholder shaped like OrderCard, for the time the orders load.
OrderFiltersButtons that narrow the order list to all orders or one status.
OrderLinesThe products of an order in a table: image, name, variant, quantity and line total.
OrderDetailScopeLoads one order for the order parts inside; nothing when it is not found.
OrderSummaryHeaderThe order's number, date, status and documents, inside OrderDetailScope.
OrderItemsThe order's products with their digital keys and guides, inside OrderDetailScope.
OrderTotalsThe order's totals, inside OrderDetailScope.
OrderReturnsThe order's returns and the way to start one, inside OrderDetailScope.
OrderDownloadsThe files a paid order unlocks, inside OrderDetailScope.
OrderInfoThe order's addresses and methods, inside OrderDetailScope.
MarketingConsentToggleThe switch that subscribes the shopper to or unsubscribes them from marketing email, next to the always-on order updates.
AuthInputOne field of an auth form: label, icon, input of the right type and autocomplete, and the field's error.
AuthSubmitThe submit button of an auth form, labelled for the form and disabled while it sends.
AuthErrorWhy the form did not send, in a notice box; nothing when there is no error.
PasskeySignInPasskey sign-in button, for the address typed in the form; nothing without browser support.
SocialSignInThe external sign-in buttons, with the terms and privacy note; nothing when no provider is on.
EmailCodeStepThe verify page's whole step: the field for the code from the email, then the password a sign-up chooses, with the button that finishes it.
AuthFieldsThe sign-in or sign-up form the merchant placed on the page, drawn through the theme's override of it when there is one; nothing when the merchant hid it.
BusinessSignUpFieldsThe company fields of a registration form: buyer type, company, tax number with its live check and tier applications; nothing without BusinessSignUp.
OrdersScopeHands a page of orders to the order history block placed inside it, so the section that pages and the block that lists read one page.

Defaults

NameWhat it is
AddressBookThe shopper's address book: every saved address, adding, changing and deleting them in dialogs.
OrderDetailOne order's page: status, documents, products with digital key delivery, totals, returns, downloads and addresses.

Constants

NameWhat it is
accountRegionsThe account template's regions, where merchants place blocks.
authRegionsThe sign-in and sign-up pages' regions, where merchants place blocks.

Types

NameWhat it is
AccountSettingsPartPropsProps of the settings parts, from PersonalInfoForm to AccountDeletion.
AccountNavItemOne entry of the account navigation.
AccountNavKindWhich kind of page an account navigation entry opens.
AccountViewThe account area's shell: the shopper and the account navigation.
AddressA postal address from the shopper's address book or an order.
AddressBookStateThe signed-in shopper's address book with the actions that change it; the host stores every change.
AddressInputA postal address as the shopper enters it, before the address book stores it.
AddressResultThe outcome of an address book action.
AddressUseWhat an address book default is set for.
AuthFieldA field of the sign-in, registration and password forms.
AuthFormStateA sign-in, registration or password form's values, errors and submit; credentials, captcha and sessions stay with the host.
AuthModeWhich sign-in form is shown.
AuthTermsThe terms checkbox a registration form needs ticked before it sends.
BusinessSignUpSigning up as a company on a registration form: the buyer type, company and tax number the host checks, and the tier applications.
CustomerA signed-in shopper.
CustomerStateThe signed-in shopper and the way out.
EmailCodeKindThe emailed step a shopper finishes on the verify page: a new account, a sign-in, a new password, a moved store account, or an outside account's sign-in.
EmailCodeStepStateThe verify page's state: asking for the code, asking for what finishes the step, or a step that is gone.
FulfillmentStatusWhere an order's delivery is.
OrderA placed order as its buyer sees it.
OrderDocumentA downloadable order document.
OrderDocumentKindWhat kind of document an order has.
OrderFulfillmentAn order's delivery state with its label and tracking.
OrderLineOne line of a placed order.
OrderPageOne page of the shopper's orders, newest first.
OrderPaymentAn order's payment state with its label.
OrderPickupPointThe parcel locker or pickup point an order is delivered to.
OrderStateOne of the signed-in shopper's orders, as it loads.
OrderStatusWhere an order is, as the shopper sees it.
OrderStatusFilterThe order list's status filter.
OrderSummaryAn order as the order list shows it: enough for a card, without the totals breakdown.
OrderSummaryLineA line of an order as the order list previews it.
OrderTrackingOne parcel's tracking.
OrdersRequestWhich page of the order list to load.
PaymentStatusWhere an order's payment is.
AddressCardPropsProps of AddressCard.
AddressFormPropsProps of AddressForm.
AddressBookPropsProps of AddressBook.
AccountNavPropsProps of AccountNav.
OrderCardPropsProps of OrderCard.
OrderCardSkeletonPropsProps of OrderCardSkeleton.
OrderFiltersPropsProps of OrderFilters.
OrderLinesPropsProps of OrderLines.
OrderDetailPropsProps of OrderDetail.
OrderDetailScopePropsProps of OrderDetailScope.
MarketingConsentTogglePropsProps of MarketingConsentToggle.
AuthInputPropsProps of AuthInput.
AuthSubmitPropsProps of AuthSubmit.
AuthErrorPropsProps of AuthError.
PasskeySignInPropsProps of PasskeySignIn.
SocialSignInPropsProps of SocialSignIn.
EmailCodeStepPropsProps of EmailCodeStep.
AuthFieldsPropsProps of AuthFields.
BusinessSignUpFieldsPropsProps of BusinessSignUpFields.
OrdersScopePropsProps of OrdersScope.
Last updated