如何找到Magento 1.x版(社区,企业或.go)

时间:2018-08-01 10:47:11

标签: magento-1.7 magento-1.9 magento-1.8

如何查找magento(在magento版本1中)版本(社区,企业或.GO)

提前谢谢!

1 个答案:

答案 0 :(得分:1)

在Magento 1中,只需打开下一个文件app/Mage.php并检查$_currentEdition变量值:

$ cat YOUR_MAGENTO_ROOT/app/Mage.php | grep _currentEdition

或者只是深入研究源代码:

... 

static private $_isInstalled;

/**
 * Magento edition constants
 */
const EDITION_COMMUNITY    = 'Community';
const EDITION_ENTERPRISE   = 'Enterprise';
const EDITION_PROFESSIONAL = 'Professional';
const EDITION_GO           = 'Go';

/**
 * Current Magento edition.
 *
 * @var string
 * @static
 */
static private $_currentEdition = self::EDITION_COMMUNITY;

/**
 * Gets the current Magento version string
 * @link http://www.magentocommerce.com/blog/new-community-edition-release-process/
 *
 * @return string
 */
public static function getVersion()
{
    $i = self::getVersionInfo();
    return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "")
                    . "-{$i['stability']}{$i['number']}", '.-');
}

...

快乐编码;)