Skip to content

Instantly share code, notes, and snippets.

@magevision
Last active January 9, 2024 09:20
Show Gist options
  • Save magevision/ea3c48c6e635fde066f40e160853d601 to your computer and use it in GitHub Desktop.
Save magevision/ea3c48c6e635fde066f40e160853d601 to your computer and use it in GitHub Desktop.
AddCustomConfigVariable
<?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>
<general>
<store_information>
<support_email_address>support@magevision.com</support_email_address>
</store_information>
</general>
</default>
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Variable\Model\Config\Structure\AvailableVariables">
<arguments>
<argument name="configPaths" xsi:type="array">
<item name="general/store_information" xsi:type="array">
<item name="general/store_information/support_email_address" xsi:type="string">1</item>
</item>
</argument>
</arguments>
</type>
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="general">
<group id="store_information">
<field id="support_email_address" translate="label" sortOrder="65" showInDefault="1" showInWebsite="1">
<label>Support Email Address</label>
</field>
</group>
</section>
</system>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment