_getConfigValue($moduleNameId, 'version'); $moduleName = $this->_getConfigValue($moduleNameId, 'name'); $moduleShortDescription = $this->_getConfigValue($moduleNameId, 'descr'); $moduleLicense = $this->_getConfigValue($moduleNameId, 'license'); $linkParameters = ''; $moduleLicenseLink = $this->_getConfigValue($moduleNameId, 'licenselink') . $linkParameters; $moduleSupportLink = $this->_getConfigValue($moduleNameId, 'redminelink') . $linkParameters; $moduleLink = $this->_getConfigValue($moduleNameId, 'permanentlink') . $linkParameters; $servicesLink = $this->_getConfigValue($moduleNameId, 'ourserviceslink') . $linkParameters; $magentoVersion = Mage::getVersion(); $magentoPlatform = $this->_getPlatform(); $logoLink = 'https://shop.etwebsolutions.com/logotypes/' . $magentoPlatform . '/' . $magentoVersion . '/' . $moduleNameId .'/' . $moduleVersion . '/' . 'logo.png'; $html = ''; $html .= '
' . $helper->__('Extension:') . ' ' . $helper->__( '%s (version %s)', $moduleName, $moduleVersion ) . '
' . $helper->__('License:') . ' ' . $helper->__( '%s', $moduleLicenseLink, $moduleLicense ) . '
' . $helper->__('Short Description:') . ' ' .$moduleShortDescription. '
' . $helper->__('Documentation:') . ' ' . $helper->__( 'You can see description of extension features and answers to the ' . 'frequently asked questions on our website.', $moduleLink) . '
' . $helper->__('Support:') . ' ' . $helper->__( 'Extension support is available through issue tracking system' . '.
You can see information freely, but you will have to sign up to open a ticket.
' . '
Please, report all bugs and feature requests that are related to this extension.
' . '
If by some reason you can not submit a question, bug report or feature request to our ' . 'ticket system, you can write us an email - support@etwebsolutions.com.', $moduleSupportLink) . '
' . $helper->__( 'You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.
' . '
You can see a list of provided services on our website.', $servicesLink) . '
'; return $html; } protected function _getConfigValue($module, $config) { $locale = Mage::app()->getLocale()->getLocaleCode(); $defaultLocale = 'en_US'; $mainConfig = Mage::getConfig(); $moduleConfig = $mainConfig->getNode('modules/' . $module . '/' . $config); if ((string)$moduleConfig) { return $moduleConfig; } if ($moduleConfig->$locale) { return $moduleConfig->$locale; } else { return $moduleConfig->$defaultLocale; } } const PLATFORM_CE = 'ce'; const PLATFORM_PE = 'pe'; const PLATFORM_EE = 'ee'; const PLATFORM_GO = 'go'; const PLATFORM_UNKNOWN = 'unknown'; protected static $_platformCode = self::PLATFORM_UNKNOWN; /** * Get edition code * @return string */ protected function _getPlatform() { if (self::$_platformCode == self::PLATFORM_UNKNOWN) { // from Magento CE version 1.7. we can get platform from Mage class if (property_exists('Mage', '_currentEdition')) { switch (Mage::getEdition()) { case Mage::EDITION_COMMUNITY: self::$_platformCode = self::PLATFORM_CE; break; case Mage::EDITION_PROFESSIONAL: self::$_platformCode = self::PLATFORM_PE; break; case Mage::EDITION_ENTERPRISE: self::$_platformCode = self::PLATFORM_EE; break; case Mage::EDITION_ENTERPRISE: self::$_platformCode = self::PLATFORM_EE; break; default: self::$_platformCode = self::PLATFORM_UNKNOWN; } } // if platform still unknown if (self::$_platformCode == self::PLATFORM_UNKNOWN) { $modulesArray = (array)Mage::getConfig()->getNode('modules')->children(); $isEnterprise = array_key_exists('Enterprise_Enterprise', $modulesArray); $isProfessional = false; // TODO: how determine? $isGo = false; // TODO: how? if ($isEnterprise) { self::$_platformCode = self::PLATFORM_EE; } elseif ($isProfessional) { self::$_platformCode = self::PLATFORM_PE; } elseif ($isGo) { self::$_platformCode = self::PLATFORM_GO; } else { self::$_platformCode = self::PLATFORM_CE; } } } return self::$_platformCode; } }