3. Configuration
A new type for e-mail templates was created by the app installation. You can now create any e-mail templates for your contact form in the administration under "Settings -> Email templates". It is important that the new type "Form confirmation to customer" is selected as "Type". You can configure the remaining settings as you wish. It is not necessary to select a sales channel for the e-mail template. In the mail text you have access to the values sent by the sender. For the contact form these are the following variables:
{{ contactFormData.firstName}}
: Moritz
{{ contactFormData.lastName }}
: Müller
{{ contactFormData.email}}
: moritz@momocode.de
{{ contactFormData.phone}}
: 123456789
{{ contactFormData.subject}}
: Question regarding "XY"
{{ contactFormData.comment}}
: Hello! I have a question about article "XY"...
{{ contactFormData.salutation.salutationKey }}
: mr
{{ contactFormData.salutation.displayName}}
: Mr
{{ contactFormData.salutation.letterName}}
: Dear Mr.
So you can see that for each field you can access the value sent by the sender.
To link the e-mail template to your contact form now and thus activate the confirmation e-mail to the customer, you must proceed as follows:
Go to "Content -> Shopping Experiences" in the Shopware Administration. Now you have two possibilities to create a new layout with a contact form. Either you duplicate the locked standard template "Default shop page layout with contact form" and edit the newly created template, or you go to "Create new layout", then select "Shop page" and enter the other configurations requested. If you have duplicated the standard template, the contact form already exists as a block. If you have created a new layout, you have to click on the + in the right column, then select "Form" under "Block Category" and drag the form element to the left into the preview area. If you now click on the element and move the mouse over it, a cogwheel symbol appears in the upper right corner of the element. When you click on the icon, a popup appears with the form settings. If the form "Contact" is selected in the tab "Content" under "Form type", the tab "Confirmation Mail" added by the app also exists. If you switch to this tab, you can select the previously created e-mail template there. The subject of the e-mail template is displayed in the selection field, as this is the most meaningful mandatory field for e-mail templates. Please note that the selection field only offers e-mail templates of the type "Form confirmation to customers". Now select your e-mail template and click on "Done" and save the layout. For further use of the layout please follow the Shopware documentation.
Last updated