Rastislav
Rastislav

Reputation: 55

Magento rewrite extension controller

I am trying to do small change in community module MDN_Organizer in Magento 1.9 and it is turning out to be nightmare for me.

I need to change also one Grid so I created in code/local folders MDN / Organizer / Block / Task and new file Grip.php

For that, I have to rewrite one Action in controller TaskController which is in folder MDN / Organizer / Controllers / TaskController.php

Is it possible to rewrite that controller in local MDN / Organizer folder? Or Do I need to put controller to my own modules?

Can controller have the same name? How etc/config should looks?

Controller is for admin.

Upvotes: 1

Views: 559

Answers (1)

You need to create new module you can keep in local or community it is not matter But add code in you file

app\etc\modules\Mycompany_Modulename.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Mycompany_Modulename>
      <active>true</active>
      <codePool>local</codePool>
      <depends>
        <MDN_Organizer/>
      </depends>
    </Mycompany_Modulename>
  </modules>
</config> 

Upvotes: 0

Related Questions