Jump to content

display not installed modules


intendit

Recommended Posts

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

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
  • Like 1
Link to comment
Share on other sites

  • 2 years later...

 

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

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...