Documentation
¶
Index ¶
- type CheckoutFormComposite
- type CheckoutFormController
- func (c *CheckoutFormController) GetUnsubmittedForm(ctx context.Context, r *web.Request) (*CheckoutFormComposite, error)
- func (c *CheckoutFormController) HandleFormAction(ctx context.Context, r *web.Request) (*CheckoutFormComposite, bool, error)
- func (c *CheckoutFormController) Inject(responder *web.Responder, applicationCartService *cartApplication.CartService, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckoutFormComposite ¶
type CheckoutFormComposite struct {
// BillingAddressForm - the processed Form object for the BillingAddressForm
// incoming form values are expected with namespace "billingAddress"
BillingAddressForm *domain.Form
// DeliveryForms - the processed Form object for the DeliveryForms
// incoming form values are expected with namespace "deliveries.###DELIVERYCODE###"
DeliveryForms map[string]*domain.Form
// SimplePaymentForm - the processed Form object for the SimplePaymentForm
// incoming form values are expected with namespace "payment"
SimplePaymentForm *domain.Form
// PersonalDataForm - the processed Form object for personal data
PersonalDataForm *domain.Form
}
CheckoutFormComposite - a complete form (composite) for collecting all checkout data
func (*CheckoutFormComposite) GetAllGeneralErrors ¶
func (c *CheckoutFormComposite) GetAllGeneralErrors() []domain.Error
GetAllGeneralErrors from the included forms
func (*CheckoutFormComposite) HasAnyGeneralErrors ¶
func (c *CheckoutFormComposite) HasAnyGeneralErrors() bool
HasAnyGeneralErrors checks if any from the included forms has general errors
type CheckoutFormController ¶
type CheckoutFormController struct {
// contains filtered or unexported fields
}
CheckoutFormController - the (mini) MVC for the complete checkout form
func (*CheckoutFormController) GetUnsubmittedForm ¶
func (c *CheckoutFormController) GetUnsubmittedForm(ctx context.Context, r *web.Request) (*CheckoutFormComposite, error)
GetUnsubmittedForm returns the form
func (*CheckoutFormController) HandleFormAction ¶
func (c *CheckoutFormController) HandleFormAction(ctx context.Context, r *web.Request) (*CheckoutFormComposite, bool, error)
HandleFormAction handles the submitted form request
func (*CheckoutFormController) Inject ¶
func (c *CheckoutFormController) Inject(responder *web.Responder, applicationCartService *cartApplication.CartService, applicationCartReceiverService *cartApplication.CartReceiverService, logger flamingo.Logger, formHandlerFactory application.FormHandlerFactory, billingAddressFormController *cartInterfaceForms.BillingAddressFormController, deliveryFormController *cartInterfaceForms.DeliveryFormController, simplePaymentFormController *cartInterfaceForms.SimplePaymentFormController, personalDataFormController *cartInterfaceForms.PersonalDataFormController, config *struct { UseDeliveryForms bool `inject:"config:commerce.checkout.useDeliveryForms"` UsePersonalDataForm bool `inject:"config:commerce.checkout.usePersonalDataForm"` }, )
Inject dependencies
Click to show internal directories.
Click to hide internal directories.