Jump to content

Link to run custom controller function


alchazar

Recommended Posts

Hi,

 

need some help. I writing PrestaShop module, and one function must be started by pressing URL from other website.

The problem is that I can't find how to run function. I only available to run controller (initContent) by using this link:

http://somesite.com/ps/index.php?fc=module&module=mymodule&controller=mycontroller

 

As I understand, there should be something like this - &function=myfunction

 

Could any one help me? 

 

Link to comment
Share on other sites

You mean you need to click on a site, reach your page and do something? Use a querystring parameter as you mentioned

?parameter=value

I suggest you read some basic php manual if this doesn't make much sense to you though ;)

Link to comment
Share on other sites

I'm talking not about sending parameters, but about running function.

 

 

class MymodulePaymentModuleFrontController extends ModuleFrontController
{
...
...
...
      public function initContent() 
      {........}

// Need to run this function by clicking link
      public function validate() 
      {........}
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...