I've added custom controller under magento frontName and it works.

My routes.xml:

        <router id="standard">

            <route id="customer" frontName="customer">
                <module name="[Vendor]_[ModuleName]"/>


Path to controller is [Vendor]/Customer/Controller/Address/EditAjax and path in url is /customer/address/editajax. Is there any drawback or possibility of errors with native magento controllers


From my understanding, we can reuse the existing route. However, in some cases, our new controllers need to check the authentication. In your case, we need to check customer authentication. If we don't check anything and write the bad code, anyone can do the CRUD operations.

Luckily, Magento builds some abstract classes for checking security. In this case, our custom class should be extended from Magento\Customer\Controller\Address.

  • 1
    thank you for complete answer! +1 for iheritance hint – Bartosz Kubicki Nov 15 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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