$edition = Mage::getEdition(); if ($edition == 'Enterprise') { // do something specific for Enterprise edition } else { // do something specific for Community edition }
$edition = Mage::getEdition(); switch ($edition) { case 'Community': require_once 'My_Module_Community.php'; $myModule = new My_Module_Community(); break; case 'Enterprise': require_once 'My_Module_Enterprise.php'; $myModule = new My_Module_Enterprise(); break; }In this example, the code dynamically loads a module based on the current edition using a switch statement. The getEdition() function is part of the Magento package library, which is a collection of classes and functions that make up the Magento framework.