Skip to content

Delivery address form

Model class

CheckoutDeliveryAddress (Ibexa\Platform\Commerce\Checkout\Form\CheckoutDeliveryAddress) extends AbstractFormEntity and implements CheckoutAddressInterface. It manages the form for choosing delivery address in checkout process.

Fields

Name Description Assertions
addressStatus Status of the delivery address
company User or company name not blank
min = 2
max = 30
companySecond Second name min = 2
max = 30
street Street name not blank
min = 2
max = 30
addressSecond Optional second address min = 2
max = 30
zip ZIP number not blank (excluding Ireland)
min = 3
max = 20
mumeric
city City name not blank
min = 2
max = 30
country Country name not blank
county County name min = 2
max = 30
phone Phone number SesAssert\Phone
email Email address SesAssert\Email
saveAddress true if the user wants to store this address in their address list boolean
partyId Party ID in ERP system string
forceStep true if the user wants to force moving to the next step with event errors boolean

Form Type

Ibexa\Platform\Commerce\Checkout\Form\TypeCheckoutDeliveryAddressType (service ID: siso_checkout.form_entity.checkout_delivery_address_type) implements the setup for this form.

This class is defined as a service to take advantage of other services, such as TransService, and to be able to read configuration settings.

Note

The scope of this service is set to prototype. A new instance of CheckoutDeliveryAddressType is created every time this service is called.

Configuration

You set the parameters in the configuration for checkout forms.

Templates

Main template EshopBundle/Resources/views/Checkout/checkout_delivery_address.html.twig
Sidebar template for invoice EshopBundle/Resources/views/Checkout/sidebar_delivery_address.html.twig

Exceptions in validation process for delivery

In some cases you need to suppress the form validation, for example:

  • If the user has a customer number and uses invoice as delivery.
  • If the user has a customer number and uses an address from a list.

In these cases the data comes from the ERP and the user cannot change it.