Nuvish Posted July 15, 2011 Share Posted July 15, 2011 I need to know the number of modules that appears in a hook to make a processing.For example, if there is a number of non-pair modules, I would like to display a different module to fill in the space left.There is there a way to do it? Link to comment Share on other sites More sharing options...
Raphaël Malié Posted July 15, 2011 Share Posted July 15, 2011 Hi, this is the query to get this total : $sql = 'SELECT COUNT(hm.id_module) FROM '._DB_PREFIX_.'hook h INNER JOIN '._DB_PREFIX_.'hook_module hm ON h.id_hook = hm.id_hook WHERE h.name = \'NAME_OF_HOOK\''; echo Db::getInstance()->getValue($sql); Link to comment Share on other sites More sharing options...
Nuvish Posted July 15, 2011 Author Share Posted July 15, 2011 Moreover, there is a need to know whether a module is appearing on the page instead of whether the module is installed.Because i can have a module which is installed,but due to it not having any product to return,it just doesnt appear. Link to comment Share on other sites More sharing options...
Raphaël Malié Posted July 15, 2011 Share Posted July 15, 2011 This can't know this information, since all module have its own behavior. 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