I need to add some custom controller actions in customer module core files in magento. How I can do this without touching the core files? I need to update the following files from the core customer module:
frontend/base/default/layout/customer.xml
app/code/core/mage/customer/controller/AccountController.php, navigation
frontend/base/default/template/customer/account/navigation.phtml
frontend/base/default/template/persistent/customer/form/register.phtml
Another file is the theme file which I also need to override/overwrite:
frontend/mtghost/default/template/catalog/product/view.phtml
Any help would be appreciated.
Best Answer
You should not override this file. If you want to make any in layout, create a new local.xml file in your theme.
You must create a module for overriding the AccountController.php file as follow.
1) app/etc/modules/Namespace_Module.xml
2) app/code/local/Namespace/Module/etc/config.xml
3) app/code/local/Namespace/Module/controllers/AccountController.php
That's the proper way you should use to override the controller.
Simple place this file in your theme using the same hierarchy as follow.
Simple place this file in your theme using the same hierarchy as follow.
This file is already in a custom theme. If its your theme then there is no harm in editing in it. If you have another theme then place this file in it as follow and override.
f) For adding custom tab in customer account, add the file with content below.