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}: Title {$momoFormData.anrede.value}: Mr {$momoFormData.vorname.label}: First name {$momoFormData.vorname.value}: Moritz {$momoFormData.nachname.label}: Last name {$momoFormData.nachname.value}: Müller {$momoFormData.email.label}: eMail-Adress {$momoFormData.email.value}: moritz@momocode.de {$momoFormData.telefon.label}: Phone {$momoFormData.telefon.value}: {$momoFormData.betreff.label}: Subject {$momoFormData.betreff.value}: Contact request {$momoFormData.kommentar.label}: Comment {$momoFormData.kommentar.value}: Dear Ladies and Gentlemen...

So for every field you have access to the label and to the value submitted by the customer. 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

When your new mail template is created, you can link it to your form by choosing the template in the free text field of your form. On forms without a linked template there will be no confirmation mail sent to the customer.

The important thing is that your form contains a field of the type "email", because the confirmation email is sent to the email address entered there. Without an e-mail field, the plugin can not know where to send the confirmation e-mail. If a form has multiple e-mail fields, the confirmation e-mail will be sent to the address entered in the first e-mail field. Position your fields accordingly.

Last updated