PHP Magento Tips

How to get list of all modules programmatically Magento ?

Rate this posting:
{[['']]}

With below script you will get list of all modules in your Magento installation in a CSV file.

Create a file called testing.php in your magento root directory and add below code:

<?php

require_once('app/Mage.php'); //Path to Magento

umask(0);

Mage::app();



$fp = fopen('exports.csv', 'w');

$csvHeader = array('codepool', 'version', 'name', 'active');

fputcsv( $fp, $csvHeader,",");



foreach(Mage::getConfig()->getNode('modules')->children() as $item){

    $codepool = Mage::getConfig()->getModuleConfig($item->getName())->codePool;

    $version = Mage::getConfig()->getModuleConfig($item->getName())->version;

    $name = $item->getName();

    $active = $item->is('active') ? 'active' : 'disabled';

    fputcsv($fp, array($codepool, $version, $name, $active), ",");

}

fclose($fp);

?>

You will find one csv file export.csv will be created in your magento root directory and will get all information about your installed module in Magento.
Tag : Magento
1 Comments On "How to get list of all modules programmatically Magento ?"

I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Typo3, kindly contact us http://www.maxmunus.com/contact
MaxMunus Offer World Class Virtual Instructor led training on Typo3. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com


Back To Top