I added to checkout custom fields following this guide, named 'customer_pec' and 'customer_recipientcode'. For each order I save the data in quote and in quote_address tables
Now I want to add the same fields on Admin side in Order view page.
Now I want to to this (if possible): add my new custom fields under "billing address" and make them editable.
I tried to add in Customer settings -> Address Templates->HTML view the code suggested by the comments below:
{{depend customer_pec}}<br /> PEC: {{var customer_pec}}{{/depend}}
then refresh cache, but I'm still not able to display the fields.
Edit: since I'm still stuck on this, I checked my code. I re-opened the guide and added several features including the new fields in sales_order_grid.xml:
<column name ="fe_data" class="Fattura24\AppFatturazione\Ui\Component\Listing\Columns\Column\FEData">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Dati FE</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="align" xsi:type="string">left</item>
</item>
</argument>
</column>
Of course I added all needed classes and templates to do this. I ran php bin/magento cache:flush but at the moment I get a blank page 'Http 500 server error' and nothing more in sales->order view.
Any debugging tool, any suggestion? Thanks.