Creating a configuration file (config.xml)

Now we will create an app/code/Foggyline/Helpdesk/etc/config.xml file with the content, as follows:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store: etc/config.xsd">
    <default>
        <foggyline_helpdesk>
            <email_template>
                <customer>
                    foggyline_helpdesk_email_template_customer
                </customer>
                <store_owner>
                    foggyline_helpdesk_email_template_store_owner
                </store_owner>
            </email_template>
        </foggyline_helpdesk>
    </default>
</config>

This might look confusing at first as to where the default | foggyline_helpdesk | email_template structure comes from. The structure itself denotes the position of our configuration values that we ...

Get Magento 2 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.