diff --git a/ps_mainmenu.php b/ps_mainmenu.php index d361e23..db89d8b 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -100,6 +100,7 @@ public function install($delete_params = true) !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('actionCategoryUpdate') || + !$this->registerHook('actionMetaPageSave') || !$this->registerHook('actionShopDataDuplication') || !$this->registerHook('displayTop')) { return false; @@ -990,6 +991,11 @@ public function hookActionCategoryUpdate($params) $this->clearMenuCache(); } + public function hookActionMetaPageSave($params) + { + $this->clearMenuCache(); + } + protected function getCacheDirectory() { $dir = _PS_CACHE_DIR_ . 'ps_mainmenu'; diff --git a/upgrade/upgrade-2.3.5.php b/upgrade/upgrade-2.3.5.php index 9749377..005c06e 100644 --- a/upgrade/upgrade-2.3.5.php +++ b/upgrade/upgrade-2.3.5.php @@ -24,5 +24,6 @@ function upgrade_module_2_3_5($module) { return Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . "hook` (`name`, `title`, `description`) VALUES - ('actionMainMenuModifier', 'Modify main menu view data', 'This hook allows to alter main menu data')"); + ('actionMainMenuModifier', 'Modify main menu view data', 'This hook allows to alter main menu data')") + && $module->registerHook('actionMetaPageSave'); }