1

I want to disable 'add new address' button from customer account address book and customer account section with checking if my custom module is - enable/disable.

file name is : vendor\magento\module-customer\view\frontend\templates\address\book.phtml

how can I override it and disable the button and edit/delete address link also?

Thanks

2 Answers 2

0

You can copy book.phtml file in your current theme on below path and comment the required code.

app/design/frontend/DESIGN_PACKAGE/THEME_NAME/Magento_Customer/templates/address/book.phtml
1
  • I want this thing with module. not with theme. Commented Dec 12, 2018 at 12:02
0

You can override the layout file in your module.

from:

vendor\magento\module-customer\view\layout\customer_address_index.xml

To

Name\Module\view\frontend\layout\customer_address_index.xml

then override phtml file in your module from

vendor\magento\module-customer\view\frontend\templates\address\book.phtml

To

Name\Module\view\frontend\templates\address\book.phtml

and do the needful changes.

Thanks.

Your Answer

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

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