InterNeo Posted August 24, 2011 Share Posted August 24, 2011 Hi, I'm trying to create new PS module. I need to get list of all payment methods using in shop. How can I do it? (What kind of variables I need to use?) Regards, (This is my first steps in PS) Link to comment Share on other sites More sharing options...
Mike Kranzler Posted August 24, 2011 Share Posted August 24, 2011 Hi InterNeo, Your best bet is to check out the default options in your Back Office, and then check out addons.prestashop.com for any additional payment methods. We're always adding more methods too, so just keep an eye out for more news! I hope this helps. -Mike 1 Link to comment Share on other sites More sharing options...
shokinro Posted August 24, 2011 Share Posted August 24, 2011 @InterNeo There are a few methods in Module class that you can use to get list of modules. You can try to filter out by the tab "payments_gateways" the module registered to Module::getModulesOnDisk(true) Modules::getModulesInstalled(); You can also look into the admin/tabs.AdminModules.php to find some hints. 1 Link to comment Share on other sites More sharing options...
InterNeo Posted August 25, 2011 Author Share Posted August 25, 2011 @shokinro: Thank you. I give you a plus I did it this way: $modulesArrays = Module::getModulesInstalled(); $selected = array(); foreach($modulesArrays as $module) { $elem = Module::getInstanceByName($module["name"]); if($elem->tab == "payments_gateways") array_push($selected, $elem->name); } $smarty -> assign('modulesList', $selected); Link to comment Share on other sites More sharing options...
shokinro Posted August 25, 2011 Share Posted August 25, 2011 thanks for your positive vote. I think you did the in correct way. Sorry I didn't have time tested it myself, but I hope it worked. Link to comment Share on other sites More sharing options...
Recommended Posts