3. Configuration

Under "Configuration -> Email templates" or from Shopware 5.6 under "Configuration -> E-mail management -> Email templates" you can create new templates for your forms in the folder "User emails". In this templates you have access to different variables. For example the names of the fields of the form and the values submitted by the customer. For example, if you link a template to the standard Contact Form, the following variables are available:

{$sShop}: Shopware Demo {$sShopURL}: http://example.com {$momoFormData.anrede.label}: Anrede {$momoFormData.anrede.value}: Herr {$momoFormData.vorname.label}: Vorname {$momoFormData.vorname.value}: Moritz {$momoFormData.nachname.label}: Nachname {$momoFormData.nachname.value}: Müller {$momoFormData.email.label}: eMail-Adresse {$momoFormData.email.value}: moritz@momocode.de {$momoFormData.telefon.label}: Telefon {$momoFormData.telefon.value}: {$momoFormData.betreff.label}: Betreff {$momoFormData.betreff.value}: Kontaktanfrage {$momoFormData.kommentar.label}: Kommentar {$momoFormData.kommentar.value}: Sehr geehrte Damen und Herren...

So you can see that per field you can access the label and the value sent by the sender. As of version 1.1.0 of the plugin, fields of type "text2" are also supported. For example, if the field has the name "plz;ort" with the label "Postal Code ; City", the following variables are available separately in the e-mail template:

{$momoFormData.plz.label}: Postal Code {$momoFormData.plz.value}: ... {$momoFormData.ort.label}: City {$momoFormData.ort.value}: ...

If your field names contain special characters or umlauts, the variables must be built into the template as follows:

{$momoFormData['straße'].label}: Street {$momoFormData['straße'].value}: Hauptstraße {$momoFormData['nationalität'].label}: Nationality {$momoFormData['nationalität'].value}: German

Once the email template is created, you can link it to the form by selecting it in the free text field of the form. For forms where nothing is selected in the free text field, the normal plain text email maintained with the form will continue to be sent.

As it is the case with the plain text email, the email is then sent to the email address that is maintained with the form.

Last updated