intendit Posted June 16, 2014 Share Posted June 16, 2014 Hi there! I have this code: $bvkmodules=Module::getModulesInstalled(); foreach($bvkmodules AS $i=>&$m){ if($mi=Module::getInstanceByName($m['name'])){ $m['displayName']=$mi->displayName; }else{ unset($bvkmodules[$i]); } } and on my tpl: <select name="bvkmodule"> {foreach from=$bvkmodules item=bvkmodule} <option value="{$bvkmodule.name}">{$bvkmodule.displayName}</option> {/foreach} </select> It display all modules that is installed in my shop, but what I want is to display is also all the modules in the modules folder and that is not installed. How can I change this code to make me display what I want? Link to comment Share on other sites More sharing options...
PascalVG Posted June 16, 2014 Share Posted June 16, 2014 I expect that this function would do the trick (in classes/module/Module.php): /** * Return available modules * * @param boolean $useConfig in order to use config.xml file in module dir * @return array Modules */ public static function getModulesOnDisk($useConfig = false, $loggedOnAddons = false, $id_employee = false) Hope this helps, pascal 1 Link to comment Share on other sites More sharing options...
ban3c Posted October 26, 2016 Share Posted October 26, 2016 I expect that this function would do the trick (in classes/module/Module.php): /** * Return available modules * * @param boolean $useConfig in order to use config.xml file in module dir * @return array Modules */ public static function getModulesOnDisk($useConfig = false, $loggedOnAddons = false, $id_employee = false) Hope this helps, pascal oki and how can I show not installed modules? please help me 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