So I want to add some text under "Additional address entries":
I tried overriding \magento\module-customer\view\frontend\templates\address\book.phtml
in my custom theme \Magento_Customer\templates\address\book.phtml
like this:
<div class="block block-addresses-list">
<div class="block-title"><strong><?php echo $block->escapeHtml(__('Additional Address Entries')) ?></strong></div>
<div class="block-content">
<?php if ($_pAddsses = $block->getAdditionalAddresses()): ?>
<ol class="items addresses">
<?php foreach ($_pAddsses as $_address): ?>
<li class="item">
<address>
<?php echo $block->getAddressHtml($_address) ?><br />
</address>
<div class="item actions">
<a class="action edit" href="<?php echo $block->escapeUrl($block->getUrl('customer/address/edit', ['id' => $_address->getId()])) ?>"><span><?php echo $block->escapeHtml(__('Edit Address')) ?></span></a>
<a class="action delete" href="#" role="delete-address" data-address="<?php echo $this->helper(\Magento\Framework\EscapeHelper::class)->escapeHtmlAttr($_address->getId()) ?>"><span><?php echo $block->escapeHtml(__('Delete Address')) ?></span></a>
</div>
</li>
<?php endforeach; ?>
</ol>
<?php else: ?>
<p class="empty"><?php echo $block->escapeHtml(__('You have no other address entries in your address book.')) ?></p>
<?php endif ?>
<!-- My added code -->
<p class="empty"><?php echo $block->escapeHtml(__('You must get in contact with your representative in order to do any modification to your personal details.')) ?></p>
</div>
It doesn't appear to have any changes, but not only what I have changed but also if I try to put some die('text')
in order to make sure I'm working in the right place.
Of course I run the commands:
php bin/magento cache:flush
php bin/magento setup:upgrade