vinaysaini Posted November 15, 2013 Share Posted November 15, 2013 (edited) 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 November 15, 2013 by vinaysaini (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 15, 2013 Share Posted November 15, 2013 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 More sharing options...
vinaysaini Posted November 15, 2013 Author Share Posted November 15, 2013 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 More sharing options...
vekia Posted November 16, 2013 Share Posted November 16, 2013 use foreach loop on function Module::getModulesInstalled() then use $wantedmodule = new Module ($value.name) you will be bale to use $wantedmodule->description etc. 1 Link to comment Share on other sites More sharing options...
vinaysaini Posted November 16, 2013 Author Share Posted November 16, 2013 (edited) 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 November 16, 2013 by vinaysaini (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 17, 2013 Share Posted November 17, 2013 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 More sharing options...
vinaysaini Posted November 21, 2013 Author Share Posted November 21, 2013 Hi Vekia, One quick question. I am not able to retrieve module configuration details.(Lets say some modules like Social Media asks Your Facebook Id and other details, After clicking on config of module in normal prestashop). How can I retrieve that. Link to comment Share on other sites More sharing options...
vekia Posted November 21, 2013 Share Posted November 21, 2013 i don't know what you mean exactly you've got own module and you can't open configuration page? or what? Link to comment Share on other sites More sharing options...
Recommended Posts