toanloau Posted March 14, 2014 Share Posted March 14, 2014 I have hook the same below public function hookActionProductAdd($params){ // how to call function from Admincontroller } i want to get parameter from $params, and i have controller, i want call Processproduct function in hookActionProductAdd when product added. class GetProductController extends ModuleAdminController{ public function Processproduct(){ self::$slimit = ( int ) Configuration::get ( 'PS_COMMIT_ITEM' ); //do something } } but i don't know how to do it. Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 class GetProductController extends ModuleAdminController{ public static function Processproduct($params){ self::$slimit = ( int ) Configuration::get ( 'PS_COMMIT_ITEM' ); //do something } } and in hook use: public function hookActionProductAdd($params){ GetProduct::Processproduct($params); } Link to comment Share on other sites More sharing options...
shaman80 Posted March 12, 2015 Share Posted March 12, 2015 class GetProductController extends ModuleAdminController{ public static function Processproduct($params){ self::$slimit = ( int ) Configuration::get ( 'PS_COMMIT_ITEM' ); //do something } } and in hook use: public function hookActionProductAdd($params){ GetProduct::Processproduct($params); } Hello. I'm trying to do the same to use a function from my module AdminController, and it can't found the class. This happens with all my modules AdminControllers. How could I solved it?. This is because I want to generate some files in every productupdate. 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