【发布时间】:2023-03-23 07:36:01
【问题描述】:
如何找到 magento(在 magento 版本 1 中)版本(社区或企业或 .GO)
提前致谢!!
【问题讨论】:
标签: magento-1.7 magento-1.9 magento-1.8
如何找到 magento(在 magento 版本 1 中)版本(社区或企业或 .GO)
提前致谢!!
【问题讨论】:
标签: magento-1.7 magento-1.9 magento-1.8
在 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']}", '.-');
}
...
编码愉快 ;)
【讨论】: