DefaultGuestCheckoutStrategy
The default implementation of the GuestCheckoutStrategy. This strategy allows guest checkouts by default, but can be configured to disallow them.
Example
- Implements:
GuestCheckoutStrategy
init
method
(injector: Injector) => constructor
method
(options?: DefaultGuestCheckoutStrategyOptions) => DefaultGuestCheckoutStrategysetCustomerForOrder
method
(ctx: RequestContext, order: Order, input: CreateCustomerInput) => Promise<ErrorResultUnion<SetCustomerForOrderResult, Customer>>Options available for the DefaultGuestCheckoutStrategy.
allowGuestCheckouts
property
booleanDefault:
trueWhether to allow guest checkouts.
allowGuestCheckoutForRegisteredCustomers
property
booleanDefault:
falseWhether to allow guest checkouts for customers who already have an account.
Note that when this is enabled, the details provided in the CreateCustomerInput
will overwrite the existing customer details of the registered customer.
Was this chapter helpful?