Magikstah Posted May 26, 2022 Share Posted May 26, 2022 Hi! I want to turn off ps_customersignin module when I install my new module because it literally replace this module, in install function I did: $query = 'UPDATE `ps_module` SET `active` = "0" WHERE `name` = "ps_customersignin"'; return parent::install() && $this->registerHook('displayNav2') && $this->registerHook('header') && $this->registerHook('actionFrontControllerSetMedia') && Db::getInstance()->ExecuteS($query) && $this->_clearCache('*'); It changes value in database but It doesnt seem to turn off module is there any way to turn off module when I install another module? I have lastest Presta version, clear install. Link to comment Share on other sites More sharing options...
Magikstah Posted May 27, 2022 Author Share Posted May 27, 2022 I found out solution - disableByName is deprecated but using Module::getInstanceByName('ps_customersignin')->disable(); Works just fine and after uninstalling Module::getInstanceByName('ps_customersignin')->enable(); And everything seems fine 1 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