I am overriding the AccountController in a Magento Extension.

In my controller i have the present

require_once 'Mage/Customer/controllers/AccountController.php';

My question is I am overriding the createPostAction() function inside my controller like so;

public function createPostAction() {

//Do stuff


so do i have to include the original createPostAction() function code found in the Magento AccountController.php inside my createPostAction() function or can i just add my additional code inside my createPostAction() function and the override will take in both functions the action is fired?

1 Answer 1


copy the complete function createPostAction() code from the core to the controller where you are overriding and make the changes in this function.

overriding means createPostAction will be called from your overriden controller not core if you overridden.

Note:- for more information on how to override createPostAction from accountcontroller.php refer http://magento-online-tutorials.blogspot.in/2015/10/how-to-override-createpost-action-in.html

  • Thanks mate! Yep just tested my question and controller action failed so thanks for clearing that up.
    – BENN1TH
    Oct 26, 2015 at 9:26

Your Answer

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

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