Jump to content

How to get specific module details from available modules


Recommended Posts

Hi,

      I am creating a back store module. In that I want to show  specific module details by its name from available modules in prestashop installation. Is there a way to retrieve all attributes of a module. 

    

Is It possible if yes How?? Any help will be appreciated.

Edited by vinaysaini (see edit history)
Link to comment
Share on other sites

Hi,

      I am creating a back store module. In that I want to show  specific module details by its name from available modules in prestashop installation. Is there a way to retrieve all attributes of a module. 

    

Is It possible if yes How?? Any help will be appreciated.

 

 

hello,

what you mean by "all attributes" ? $this variable from module defined in __construct function ?

Link to comment
Share on other sites

Hi Vekia thanks for your reply,

 

              I mean lets say I am creating module called Z. And in prestashop installation there are already modules A,B,C,D... and so on. In my module Z, I want to show some information of module B and C(Lets say their description, their image and so on.) 

               Like when we are logged in back store and we go to modules, we get to see all modules listing.  Similarly I need to show some of them in my module.

Link to comment
Share on other sites

Thanks Vekia,

     I haven't tried your solution as I got it working already but I am sure it will work. 

 

What I did:

 $module = Module::getInstanceByName($name);  /* $name = "wanted module name" */

 And I got all the things needed for that particular module as I have the instance of module.

Edited by vinaysaini (see edit history)
Link to comment
Share on other sites

you can also use Module::getModulesOnDisk();

you will get all informataions about all modules (desc, name, vesion etc.) in one simple funciton 

no mutli instances of Module object - this method is much faster one, but you will see all modules on disc (also uninstalled)

Link to comment
Share on other sites

×
×
  • Create New...