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
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
-
I want this thing with module. not with theme.Utsav Gupta– Utsav Gupta2018年12月12日 12:02:43 +00:00Commented Dec 12, 2018 at 12:02
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.
Explore related questions
See similar questions with these tags.