Another quote is for “Address Lock” so if the customer has 30 addresses in the address book, he won’t be able to edit/delete/add the address. He can only select one of those addresses for shipping.
- The user should not be allowed to edit, create or delete when the customer has 30 addresses in the address book
- The options should be hidden when the address count >= 30
- The notification message should be shown when the address count is >= 30
solution:
We need to update the custom module to address and the corresponding templates used for the address list
In the implementation, we will hide the option for edit, create or delete for the list of addresses. And we will provide a notification message ““Address is locked and please select one the addresses added” for address Lock.
Javacript code:Entry point

Template
{{#if isremovebutton}}
{{#unless hideAddButton}}
<a class="address-details-new-address" href="/addressbook/new" data-toggle="show-in-modal">
<div class="address-details-new-address-title">
<p><i class="address-details-new-address-plus-icon"></i></p>
{{translate 'Add Address'}}
</div>
</a>
{{/unless}}
{{/if}}