FranciscoVillen Posted May 31, 2016 Share Posted May 31, 2016 Hi developers, I'm doing a modification in the loyalty basic module and I need to add a form in the hookAdminCustomers, so the admin can add points to a determined customer. I know there is a function renderForm but it is always used when you have an admin page and is used in a ModuleAdminController. I'm not sure if I should use it in my case. Basically I want to add a form in the hookAdminCustomers in a module and add a php function as an action to the form submit. I would like to know which is the standar in prestashop and the functions I should use to set the form and the action. I have searched in the prestashop documentation and google but I haven't found anything. Maybe I'm not searching for the right words. I would be grateful if someone could clarify what I have to use. Link to comment Share on other sites More sharing options...
FranciscoVillen Posted May 31, 2016 Author Share Posted May 31, 2016 (edited) I have reached a way to do this, I would like to know if it is the best way to do this in Prestashop: public function hookAdminCustomers($params){ ... $this->processModifyPoints(); ... } public function processModifyPoints(){ if(Tools::isSubmit('submitmodifypoints')){ /* Do something */ } } And in the form shown in the hook AdminCustomers I put name=submitmodifypoints. in the input type submit Edited May 31, 2016 by FranciscoVillen (see edit history) 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