alchazar Posted July 15, 2015 Share Posted July 15, 2015 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 More sharing options...
NemoPS Posted July 15, 2015 Share Posted July 15, 2015 You mean you need to click on a site, reach your page and do something? Use a querystring parameter as you mentioned?parameter=valueI suggest you read some basic php manual if this doesn't make much sense to you though Link to comment Share on other sites More sharing options...
alchazar Posted July 15, 2015 Author Share Posted July 15, 2015 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 More sharing options...
NemoPS Posted July 17, 2015 Share Posted July 17, 2015 Use the parameter inside init()That runs every time the controller is launched Link to comment Share on other sites More sharing options...
alchazar Posted July 20, 2015 Author Share Posted July 20, 2015 Ok, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now