Jump to content

Recommended Posts

I am trying to add a ModuleAdminController to process a 'submit' function for a button that was placed in hookAdminCustomers but I cannot get the controller to work.

 

Background:

 

I have used the AdminCustomers hook to plug-in custom data (exactly like the referralprogram module). I have included a button to submit a request. I am not sure on the best way to handle the request but I have tried the following:

 

created a folder mymodule/controllers/admin

added a file /Admin{modulename}Controller.php

with

class Admin{modulename}Controller extends ModuleAdminController

I am trying to access the controller using

root/adminfolder/index.php?controller=Admin{modulename}Controller&token={token}

and

root/adminfolder/index.php?controller=Admin{modulename}&token={token}

 

I get "The controller {name} is missing or invalid}

 

I have also tried adding a Menu item with the information to the class and module.

 

Question:

What is the best way to process this request? The controller doesn't need to display anything. Instead just execute a database command. Preferably using an ajax post.

 

Please help.

Link to comment
Share on other sites

×
×
  • Create New...