Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Override Custom Module’s Controller file in Magento 2

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Location
    Bhavnagar, Gujarat, India
    Posts
    299
    Thanks
    0
    Thanked 1 Time in 1 Post

    Post How to Override Custom Module’s Controller file in Magento 2


  2. #2
    Junior Member
    Join Date
    Jan 2018
    Location
    New York
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To rewrite controller, you can do it by using preference. It mean that you need to put a rule in your router config using before attribute.

    Open Mageplaza/HelloWorld/etc/routes.xml insert the following block of code inside <config> tag rewrite controller in Magento 2

    Read detail in How to rewrite controller in Magento 2

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •