Esempio n. 1
0
 /**
  * Common data for all request types
  *
  * @return array
  */
 protected function getRequestCommonData()
 {
     $data = array(static::FIELD_VERSION_API => static::MP_API_VERSION, static::FIELD_SHOP_ID => $this->generateShopID(), static::FIELD_SHOP_DOMAIN => \Includes\Utils\ConfigParser::getOptions(array('host_details', 'http_host')), static::FIELD_SHOP_URL => \XLite\Core\URLManager::getShopURL(), static::FIELD_VERSION_CORE_CURRENT => $this->getVersionField(\XLite::getInstance()->getMajorVersion(), \XLite::getInstance()->getMinorVersion()), static::FIELD_XCN_LICENSE_KEY => \XLite::getXCNLicenseKey(), static::FIELD_INSTALLATION_LNG => \XLite::getInstallationLng());
     return $data;
 }
Esempio n. 2
0
 /**
  * Return true if default free license key is activated
  *
  * @return boolean
  */
 protected function isDefaultFreeLicenseActivated()
 {
     return \XLite\Core\Marketplace::XC_FREE_LICENSE_KEY == \XLite::getXCNLicenseKey();
 }
Esempio n. 3
0
 /**
  * Module has license restriction if the core has free license but the module does not have free edition
  * The empty editions field means the module has no license restriction
  *
  * @return boolean
  */
 public function hasLicenseRestriction()
 {
     $result = false;
     $coreKey = \XLite::getXCNLicenseKey();
     // The store without any license (trial license active) has no license-restricted module
     if ($coreKey !== '') {
         $editions = $this->getEditionNames();
         // The module with the empty editions structure has no restrictions
         if (!empty($editions)) {
             $freeEdition = \XLite\Core\Marketplace::getInstance()->getFreeLicenseEdition();
             // Module has restricted if there is no freeEdition in the editions structure
             $result = !in_array($freeEdition, $editions);
         }
     }
     return $result;
 }