{"id":836,"date":"2020-03-10T15:19:16","date_gmt":"2020-03-10T15:19:16","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/03\/10\/show-custom-data-in-shipping-address-box-in-magento-2-admin\/"},"modified":"2025-05-22T14:48:33","modified_gmt":"2025-05-22T09:18:33","slug":"show-custom-data-in-shipping-address-box-in-magento-2-admin","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/show-custom-data-in-shipping-address-box-in-magento-2-admin\/","title":{"rendered":"How To Show Custom Data In Shipping Address Box In Magento 2 Admin"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2 platform is the number one choice for many businesses. However, the default Magento 2 features may not be enough to satisfy all the business requirements. Because of the flexibility of customization, the <a href=\"https:\/\/meetanshi.com\/hire-magento-developer.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento developers<\/a> can tweak the default functionalities and improve the shopping platform.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Talking about customization, I have come up with a solution to <strong>show custom data in shipping address box in Magento 2 admin<\/strong> panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, you own a Magento 2 store in India and have to <a href=\"https:\/\/mydukaan.io\/tools\/gst-calculator\" target=\"_blank\" rel=\"noreferrer noopener\">calculate GST<\/a>. It requires additional fields like CGST and SGST. Using the below code, you can implement displaying custom attributes in shipping address box in Magento 2 admin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Other examples, such as phone number type or any custom fields added in the checkout step, can be shown in the shipping address box in the admin panel. In addition to this, you can also set up <a href=\"https:\/\/meetanshi.com\/blog\/configure-multiple-shipping-addresses-in-magento-2\/\">multiple shipping addresses in Magento 2<\/a> to allow customers add more than one address.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method to show custom data in shipping address box in Magento 2 admin:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to <strong>Stores -&gt; Configuration -&gt; Customers -&gt; Customer Configuration -&gt; Address Templates<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Find the HTML section from the address template.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Untick checkbox system value and add the below code. Also, you may change the attribute code if needed. For the email template, same address format [HTML Address format] works fine.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{depend mob_type}}Mob_Type: {{var mob_type}}{{\/depend}}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If required, run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:clean<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An attribute shows at the order view page and order Email also.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this method, both the addresses are displayed. However, if you want to display only in shipping, you can only put SMS value in shipping address table (<code>sales_order_address and quote_address<\/code>) and not billing. It works just fine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do share the solution with fellow Magento developers via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 platform is the number one choice for many businesses. However, the default Magento 2 features may not be enough to satisfy all the&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-836","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=836"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/836\/revisions"}],"predecessor-version":[{"id":15040,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/836\/revisions\/15040"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}