How to show a custom attribute in the admin Shipping Address box?

Navigate to System Configuration

Stores -> Configuration -> Customers -> Customer Configuration -> Address Templates

From Address Templates, Find HTML section, untick checkbox system value, add following code. you may change an attribute code if need.

For the email template, same address format [HTML Address format] will work.

{{depend mob_type}}Mob_Type: {{var mob_type}}{{/depend}}

Run php bin/magento cache:clean if not shows.

An attribute will show at the order view page and order email also.

above is displayed in both address but if you want only show in shipping then you need to put only SMS value in shipping address table (sales_order_address and quote_address) not billing it's working fine. Enjoy

Table view -

enter image description here

Result -

enter image description here


Try with my approach. Taking into consideration module as described in the question.

  1. Used the same module showing in the question. no change

  2. Installed reference extension which you are referring (SMS extension)

Navigate to System Configuration

Stores -> Configuration -> Customers -> Customer Configuration -> Address Templates

From Address Templates, Find HTML section, untick checkbox system value, add following code. you may change an attribute code if need.

For email template, same address format [HTML Address format] will work.

{{depend mob_type}}Mob_Type: {{var mob_type}}{{/depend}}

enter image description here

may be required to clear cache.

Run php bin/magento cache:clean if not shows

An attribute will show at the order view page and order email also.

enter image description here


If the attribute is saved correctly you need to add the attribute to address templates. These can be found in

Stores -> Configuration -> Customers -> Customer Configuration -> Address Templates

You can add at the end something like:

{{depend mob_type}}, Mob. Type: {{var mob_type}}{{/depend}}

Depending on the template type, you can use <br/> to create new lines.