0

I want to change the address information format in shipment, invoice, and credit memo. Right now the format is Magento address information format like this

enter image description here

I want to display the area and subdistrict. I tried to check the core file. And for displaying the account and order and address information is bundled in this line <?= $block->getChildHtml('order_info') ?>. I find out about the parent class of this block to check the getChildHtml but I have not found the root class to bundle all those information. anyone knows how Magento bundle all of this information? or is there another way to change this address information format?

1 Answer 1

1

You can change the address format in the Magento Admin panel. Go to Stores > Configuration > Customers > Customer Configuration > Address Templates. Address templates screen

Reference: https://docs.magento.com/user-guide/customers/address-templates.html

3
  • I tried this one too. I directly add subdistrict and area become like this {{if subdistrict}}{{var subdistrict}} {{if area}}{{var area}} but it does not work. is there any rule for this? Mar 2, 2021 at 2:17
  • I am not sure what subdistrict is - is this a custom field you have added already? Because Magento by default does not include all country's regions. So you may need to make more customisations? Or you could consider third-party extension such as store.webkul.com/magento2-custom-regions.html - I haven't had to make such customisation before, sorry!
    – bernieu2
    Mar 2, 2021 at 2:39
  • The subdistrict is a division of a city but smaller than the city. and yeah that's an additional field on sales_order_address. I may need to make some customization. Thanks a lot Mar 2, 2021 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.