Nadjib BELLOUNDJA Posted June 21, 2015 Posted June 21, 2015 Hi everybody, Once I get this tab, I would like to have changes that are specific to a category and others that are specific to the produt. I would like each of this changes to be handled by different controllers. My question is when and how do I call other controllers within my hookDisplayAdminProductsExtra($params) function. My function is currently: public function hookDisplayAdminProductsExtra($params) { // I WOULD LIKE TO CALL MY CONTROLLERS IN THE module_folder/controllers/admin AND MAKE THEM CALL THE FOLLOWING PAGE return $this->display(__FILE__, 'stampcustom_admin_tab.tpl'); } Thanks. Share this post Link to post Share on other sites More sharing options...
vekia Posted June 22, 2015 Posted June 22, 2015 include this controller file to your code with require_once 'yourcontroller.php'then if you've got non static function call it with:YourController=new YourControllerName(); YourController->callYourFunction(); if you've got static function you can call it with: YourControllerName::CallYourFunction(); 1 Share this post Link to post Share on other sites More sharing options...
Nadjib BELLOUNDJA Posted June 22, 2015 Posted June 22, 2015 Thanks Vekia, It worked. I just changed the required_once into require_once(dirname(__FILE__).'/controllers/admin/default.php') insteas. Share this post Link to post 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