I'd like to override the address layout defined in Magento\Customer\etc\config.xml
-> default | customer | address_templates | oneline | html
In Magento 1, we could re-define a config.xml file in the local pool or in a module, and everything got mashed together and our new values over-rode it.
However, this doesn't seem to work in Magento 2, assuming from the documentation that config.xml
only affects the scope of the module? So, I've tried adding:
Vendor/Namespace/etc/config.xml
or Vendor/Namespace/etc/frontend/config.xml
with the following content:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customer>
<address_templates>
<html><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br/>{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br/>
{{var country}}<br/>
{{depend telephone}}Telephone: {{var telephone}}{{/depend}}
{{depend fax}}<br/>F: {{var fax}}{{/depend}}
{{depend vat_id}}<br/>VAT: {{var vat_id}}{{/depend}}]]>
</html>
</address_templates>
</customer>
</default>
</config>
However, I don't get the change (Telephone: instead of T: in this quick example).
EDIT: module.xml looks like this:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_Namespace" setup_version="0.1.0">
<sequence>
<module name="Magento_Customer"/>
</sequence>
</module>
Do I need to create my own renderer for this and add a preference to use it, or am I missing something?