Jump to content

Reset my module from code


Recommended Posts

Hello guys,

I'm new in prestashop and i want to learn. I have a problem, i trying to reset a random module from my shop when i access a front controller(when i acces the link, the selected module will be reset), but i don't know why the controllers and hooks are not installed and i don't know why......

Value from modul are reset but the hooks and controllers are not installed....

I use prestashop 1.6.1.18, for 1.7.x it's working perfect...

 

$value = 'randomModule';
$module_name_reset = Module::getInstanceByName($value);

$module_name_reset->uninstall();
$module_name_reset->install();
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...