Data processors¶
Data processors are executed after a form is submitted. You can use any number of data processors per form. The configuration lists data processors that are executed in sequence, for example:
1 2 3 4 5 6 |
|
FormDataProcessorException¶
If one of the data processors throws FormDataProcessorException
, this stops further processing.
The user sees the filled form with the error message from FormDataProcessorException
.
CreateCustomerProfileDataDataProcessor¶
CreateCustomerProfileDataDataProcessor
creates a new CustomerProfileData
object and fills it with data from the registration process.
Service ID: ses.customer_profile_data.data_processor.create_customer_profile_data
Customer type¶
You can set the customer type in configuration:
1 2 3 4 5 |
|
CreateRegistrationTokenDataProcessor¶
CreateRegistrationTokenDataProcessor
creates a new token with the help of TokenService
.
Service ID: ses_forms.create_registration_token_data_processor
The parameters for the createToken()
method are taken from the configuration:
1 2 3 4 5 |
|
EzCreateUserDataProcessor¶
EzCreateUserDataProcessor
creates a new EzUser
object. This data processor relies on the result of CreateCustomerProfileDataDataProcessor
,
because the CustomerProfileData
object must be given.
The data processor sets the following fields in the User Content item:
login
email
password
name
customer_number
contact_number
customer_profile_data
ses_hastopay_vat
ses_display_vat
Ibexa DXP provides a standard event for this handler, which adds a prefix to the login name of the user.
The prefix can be defined in the configuration key data_processor_ez_user_login_prefix
.
1 2 3 4 |
|
Service ID: ses_forms.create_ez_user
Values set for private/business registration:
Private:
1 2 |
|
Business:
1 2 |
|
EzUserDisableDataProcessor¶
EzUserDisableDataProcessor
disables the User after registration.
Service ID: ses_forms.disable_ez_user
EzUserLoginDataProcessor¶
EzUserLoginDataProcessor
logs in as a User.
Service ID: ses_forms.login_new_ez_user
HasFormChangedDataProcessor¶
HasFormChangedDataProcessor
checks if the default values in the form are changed after the form is submitted.
Service ID: ses.customer_profile_data.data_processor.has_form_changed
SendCancellationEmailDataProcessor¶
SendCancellationEmailDataProcessor
sends an email after the user fills the cancellation form.
The cancellation email receiver and the cancellation subject can be set in configuration:
1 2 3 4 5 6 7 8 |
|
Service ID: siso_core.data_processor.send_cancellation_email
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\Cancellation
SendConfirmationMailDataProcessor¶
SendConfirmationMailDataProcessor
sends an email in the following cases:
- When a private customer registers, an email is sent to the user email address with an activation link.
- When a business customer registers, an email is sent to the administrator with all submitted data (including attachment). The task of the administrator is to validate the data.
- When a customer who has a customer number edits their profile data (see HasFormChangedDataProcessor), an email is sent to the administrator.
Symfony SwiftMailer is used to send the email.
Service ID: ses_forms.send_confirmation_data_processor
The mail sender and receiver can be set in configuration:
1 2 3 |
|
Email Templates¶
Two templates are available for each form type, in .txt
or .html
format.
The name of the template must keep this form: ConfirmationMail_' . $formName . '.txt.twig'
, ConfirmationMail_' . $formName . '.html.twig'
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Footer
The default mail footer that is included into emails is located in EshopBundle/Resources/views/Emails/mail_footer.html.twig
.
SendContactEmailDataProcessor¶
SendContactEmailDataProcessor
sends an email after the user fills the contact form.
If the user checked that they want to get a copy of this email, additional email is sent to the user email address as well.
By default the email is sent to the contactMailReceiver
who is set in configuration:
1 2 3 4 5 |
|
Service ID: siso_core.data_processor.send_contact_email
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\Contact
SendRmaEmailDataProcessor¶
SendRmaEmailDataProcessor
sends an email after the user has filled the RMA (return merchandise authorization) form.
The RMA mail receiver and the RMA subject can be set up in configuration.
The RMA mail receiver is the same one as the cancellation email receiver.
1 2 3 4 5 6 7 8 |
|
Service ID: siso_core.data_processor.send_rma_email
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\RMA
UpdateBuyerDataProcessor¶
UpdateBuyerDataProcessor
updates CustomerProfileData
in the User
object when the user edits the buyer address (see HasFormChangedDataProcessor).
The changes are stored only if the user has no customer number.
Service ID: ses.customer_profile_data.data_processor.update_buyer
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\Customer\Buyer
UpdateCustomerProfileDataProcessor¶
UpdateCustomerProfileDataProcessor
updates CustomerProfileData
in the User
object when the user adds or edits their address.
Service ID: siso_core.data_processor.update_customer_profile_data
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\Address
UpdateMyAccountDataProcessor¶
UpdateMyAccountDataProcessor
updates CustomerProfileData
and other Content item attributes (like email) in the User
object
when the user edits their account and introduces changes (see HasFormChangedDataProcessor).
The changes are stored only if the user has no customer number.
Service ID: ses.customer_profile_data.data_processor.update_buyer
Corresponding form: Silversolutions\Bundle\EshopBundle\Form\Customer\MyAccount
ValidateBusinessActivationDataProcessor¶
ValidateBusinessActivationDataProcessor
checks if the submitted invoice and customer number are valid.
This resolves communication with ERP.
Service ID: ses_forms.validate_business_activation