Anpassung auf 6.1.x

Cette révision appartient à :
Markus Gärtner 2020-04-17 09:29:09 +02:00
Parent bf2e874254
révision 265cd90dd0
20 fichiers modifiés avec 628 ajouts et 435 suppressions

Voir le fichier

@ -1,50 +0,0 @@
<?php
/**
* Metadata version
*/
$sMetadataVersion = '1.1';
/**
* Module information
*/
$aModule = array(
'id' => 'd3geoip',
'title' => (class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') . ' GeoIP Vorauswahl',
'description' => array(
'de' => 'Begr&uuml;&szlig;en Sie Ihre Kunden in seiner Landessprache.',
'en' => '',
),
'thumbnail' => 'picture.png',
'version' => '3.1.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
'oxcmp_lang' => 'd3/d3geoip/modules/components/d3_oxcmp_lang_geoip',
'oxshopcontrol' => 'd3/d3geoip/modules/controllers/d3_oxshopcontrol_geoip',
),
'files' => array(
'd3cmp_geoip' => 'd3/d3geoip/components/d3cmp_geoip.php',
'd3_cfg_geoipset' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset.php',
'd3_cfg_geoipset_list' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_list.php',
'd3_cfg_geoipset_main' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_main.php',
'd3_cfg_geoipset_licence' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_licence.php',
'd3_country_geoip' => 'd3/d3geoip/controllers/admin/d3_country_geoip.php',
'd3geoip' => 'd3/d3geoip/models/d3geoip.php',
'd3geoip_update' => 'd3/d3geoip/setup/d3geoip_update.php',
),
'templates' => array(
'd3_cfg_geoipset_main.tpl' => 'd3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl',
'd3_country_geoip.tpl' => 'd3/d3geoip/views/admin/tpl/d3_country_geoip.tpl',
),
'events' => array(
'onActivate' => 'd3install::checkUpdateStart',
),
'blocks' => array(
),
'd3FileRegister' => array(
'd3/d3geoip/IntelliSenseHelper.php',
'd3/d3geoip/metadata.php',
'd3/d3geoip/views/admin/de/d3_geoip_lang.php',
),
);

Voir le fichier

@ -1,17 +0,0 @@
<?php
class d3_oxcmp_lang_geoip extends d3_oxcmp_lang_geoip_parent
{
private $_sModId = 'd3_geoip';
public function init()
{
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
/** @var $oLocation d3geoip */
$oLocation = oxNew('d3geoip');
$oLocation->setCountryLanguage();
}
parent::init();
}
}

Voir le fichier

@ -14,7 +14,20 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3cmp_geoip extends oxView namespace D3\GeoIp\Application\Component;
use D3\GeoIp\Application\Model\d3geoip;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Controller\BaseController;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
class d3cmp_geoip extends BaseController
{ {
/** /**
* Marking object as component * Marking object as component
@ -25,17 +38,27 @@ class d3cmp_geoip extends oxView
private $_sModId = 'd3_geoip'; private $_sModId = 'd3_geoip';
/**
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws ConnectionException
* @throws SystemComponentException
*/
public function init() public function init()
{ {
if (d3_cfg_mod::get($this->_sModId)->isActive()) { if (d3_cfg_mod::get($this->_sModId)->isActive()) {
if (d3_cfg_mod::get($this->_sModId)->hasDebugMode()) { if (d3_cfg_mod::get($this->_sModId)->hasDebugMode()) {
/** @var $oGeoIp d3geoip */ /** @var $oGeoIp d3geoip */
$oGeoIp = oxNew('d3geoip'); $oGeoIp = oxNew(d3geoip::class);
echo $oGeoIp->getIP(); echo $oGeoIp->getIP();
} }
/** @var $oLocation d3geoip */ /** @var $oLocation d3geoip */
$oLocation = oxNew('d3geoip'); $oLocation = oxNew(d3geoip::class);
$oLocation->setCountryCurrency(); $oLocation->setCountryCurrency();
// moved to oxcmp_lang extension because here it's to late // moved to oxcmp_lang extension because here it's to late
// $oLocation->setCountryLanguage(); // $oLocation->setCountryLanguage();
@ -48,7 +71,7 @@ class d3cmp_geoip extends oxView
// reason: own component can added after default components only // reason: own component can added after default components only
if ($oLocation->hasNotSetCurrency($oBasket->getBasketCurrency())) { if ($oLocation->hasNotSetCurrency($oBasket->getBasketCurrency())) {
/** @var oxUBase $oActView */ /** @var oxUBase $oActView */
$oActView = oxRegistry::getConfig()->getActiveView(); $oActView = Registry::getConfig()->getActiveView();
$aComponents = $oActView->getComponents(); $aComponents = $oActView->getComponents();
/** @var oxcmp_cur $oCurCmp */ /** @var oxcmp_cur $oCurCmp */

Voir le fichier

@ -1,5 +1,9 @@
<?php <?php
namespace D3\GeoIp\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_;
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.

Voir le fichier

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -15,6 +14,10 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
namespace D3\GeoIp\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_licence;
class d3_cfg_geoipset_licence extends d3_cfg_mod_licence class d3_cfg_geoipset_licence extends d3_cfg_mod_licence
{ {
protected $_sModId = 'd3_geoip'; protected $_sModId = 'd3_geoip';

Voir le fichier

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -15,6 +14,10 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
namespace D3\GeoIp\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_list;
class d3_cfg_geoipset_list extends d3_cfg_mod_list class d3_cfg_geoipset_list extends d3_cfg_mod_list
{ {
// enables language depended configuration // enables language depended configuration

Voir le fichier

@ -1,5 +1,12 @@
<?php <?php
namespace D3\GeoIp\Application\Controller\Admin;
use D3\GeoIp\Application\Model\d3geoip;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use OxidEsales\Eshop\Application\Model\CountryList;
use OxidEsales\Eshop\Core\Registry;
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -27,19 +34,25 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
/** /**
* @param $sIP * @param $sIP
* @return string * @return string
* @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
*/ */
public function getIpCountry($sIP) public function getIpCountry($sIP)
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
/** @var $oD3GeoIP d3geoip */ /** @var $oD3GeoIP d3geoip */
$oD3GeoIP = oxNew('d3geoip'); $oD3GeoIP = oxNew(d3geoip::class);
$oCountry = $oD3GeoIP->getUserLocationCountryObject($sIP); $oCountry = $oD3GeoIP->getUserLocationCountryObject($sIP);
if ($oCountry->getId()) { if ($oCountry->getId()) {
$sTitle = $oCountry->getFieldData('oxtitle'); $sTitle = $oCountry->getFieldData('oxtitle');
} else { } else {
$sTitle = oxRegistry::getLang()->translateString('D3_GEOIP_SET_IP_CHECKIP_NOTSET'); $sTitle = Registry::getLang()->translateString('D3_GEOIP_SET_IP_CHECKIP_NOTSET');
} }
stopProfile(__METHOD__); stopProfile(__METHOD__);
@ -48,7 +61,7 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
} }
/** /**
* @return oxcountrylist * @return CountryList
*/ */
public function getIPCountryList() public function getIPCountryList()
{ {
@ -57,10 +70,10 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
} }
startProfile(__METHOD__); startProfile(__METHOD__);
/** @var $oGeoIp d3geoip */ /** @var $oGeoIp d3geoip */
$oGeoIp = oxNew('d3geoip'); $oGeoIp = oxNew(d3geoip::class);
/** @var $oCountryList oxcountrylist */ /** @var $oCountryList CountryList */
$this->oCountryList = oxNew('oxcountrylist'); $this->oCountryList = oxNew(CountryList::class);
$oListObject = $this->oCountryList->getBaseObject(); $oListObject = $this->oCountryList->getBaseObject();
$sFieldList = $oListObject->getSelectFields(); $sFieldList = $oListObject->getSelectFields();
$sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName(). $sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName().

Voir le fichier

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -15,7 +14,16 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_country_geoip extends oxAdminView namespace D3\GeoIp\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
use stdClass;
class d3_country_geoip extends AdminDetailsController
{ {
protected $_sDefSort = 'sort'; protected $_sDefSort = 'sort';
protected $_sDefSortOrder = 'asc'; protected $_sDefSortOrder = 'asc';
@ -31,18 +39,18 @@ class d3_country_geoip extends oxAdminView
*/ */
public function render() public function render()
{ {
if (false == oxRegistry::getConfig()->getConfigParam('blAllowSharedEdit')) { if (false == Registry::getConfig()->getConfigParam('blAllowSharedEdit')) {
$this->addTplParam('readonly', true); $this->addTplParam('readonly', true);
} }
$ret = parent::render(); $ret = parent::render();
$soxId = oxRegistry::getConfig()->getRequestParameter("oxid"); $soxId = Registry::get(Request::class)->getRequestParameter("oxid");
// check if we right now saved a new entry // check if we right now saved a new entry
$sSavedID = oxRegistry::getConfig()->getRequestParameter("saved_oxid"); $sSavedID = Registry::get(Request::class)->getRequestParameter("saved_oxid");
if (($soxId == "-1" || !isset($soxId)) && isset($sSavedID)) { if (($soxId == "-1" || !isset($soxId)) && isset($sSavedID)) {
$soxId = $sSavedID; $soxId = $sSavedID;
oxRegistry::getSession()->deleteVariable("saved_oxid"); Registry::getSession()->deleteVariable("saved_oxid");
$this->addTplParam("oxid", $soxId); $this->addTplParam("oxid", $soxId);
// for reloading upper frame // for reloading upper frame
$this->addTplParam("updatelist", "1"); $this->addTplParam("updatelist", "1");
@ -69,7 +77,7 @@ class d3_country_geoip extends oxAdminView
$this->addTplParam("edit", $oCountry); $this->addTplParam("edit", $oCountry);
// remove already created languages // remove already created languages
$aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang); $aLang = array_diff(Registry::getLang()->getLanguageNames(), $oOtherLang);
if (count($aLang)) { if (count($aLang)) {
$this->addTplParam("posslang", $aLang); $this->addTplParam("posslang", $aLang);
@ -98,6 +106,9 @@ class d3_country_geoip extends oxAdminView
/** /**
* @param $sIdent * @param $sIdent
* @return mixed * @return mixed
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/ */
public function getModCfgValue($sIdent) public function getModCfgValue($sIdent)
{ {
@ -117,12 +128,12 @@ class d3_country_geoip extends oxAdminView
public function save() public function save()
{ {
//allow malladmin only to perform this action //allow malladmin only to perform this action
if (false == oxRegistry::getConfig()->getConfigParam('blAllowSharedEdit')) { if (false == Registry::getConfig()->getConfigParam('blAllowSharedEdit')) {
return; return;
} }
$soxId = oxRegistry::getConfig()->getRequestParameter("oxid"); $soxId = Registry::get(Request::class)->getRequestParameter("oxid");
$aParams = oxRegistry::getConfig()->getRequestParameter("editval"); $aParams = Registry::get(Request::class)->getRequestParameter("editval");
/** @var $oCountry oxcountry */ /** @var $oCountry oxcountry */
$oCountry = oxNew("oxcountry"); $oCountry = oxNew("oxcountry");
@ -136,14 +147,14 @@ class d3_country_geoip extends oxAdminView
$oCountry->setLanguage(0); $oCountry->setLanguage(0);
$oCountry->assign($aParams); $oCountry->assign($aParams);
$oCountry->setLanguage($this->_iEditLang); $oCountry->setLanguage($this->_iEditLang);
$oCountry = oxRegistry::get('oxUtilsFile')->processFiles($oCountry); $oCountry = Registry::get('oxUtilsFile')->processFiles($oCountry);
$oCountry->save(); $oCountry->save();
$this->addTplParam("updatelist", "1"); $this->addTplParam("updatelist", "1");
// set oxid if inserted // set oxid if inserted
if ($soxId == "-1") { if ($soxId == "-1") {
oxRegistry::getSession()->setVariable("saved_oxid", $oCountry->getId()); Registry::getSession()->setVariable("saved_oxid", $oCountry->getId());
} }
} }
@ -157,6 +168,9 @@ class d3_country_geoip extends oxAdminView
/** /**
* @return array * @return array
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/ */
public function getCurList() public function getCurList()
{ {
@ -166,13 +180,14 @@ class d3_country_geoip extends oxAdminView
) { ) {
$sShopId = $this->oCountry->getFieldData('d3geoipshop'); $sShopId = $this->oCountry->getFieldData('d3geoipshop');
} else { } else {
$sShopId = oxRegistry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId(); $sShopId = Registry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId();
} }
$sQ = "select DECODE( oxvarvalue, '".oxRegistry::getConfig()->getConfigParam('sConfigKey'). $sQ = "select DECODE( oxvarvalue, '".Registry::getConfig()->getConfigParam('sConfigKey').
"') as oxvarvalue from oxconfig where oxshopid = '".$sShopId."' AND oxvarname = 'aCurrencies'"; "') as oxvarvalue from oxconfig where oxshopid = '".$sShopId."' AND oxvarname = 'aCurrencies'";
$sCurs = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sQ); $oDB = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
$sCurs = $oDB->getOne($sQ);
return $this->d3ExtractCurList($sCurs); return $this->d3ExtractCurList($sCurs);
} }
@ -201,6 +216,9 @@ class d3_country_geoip extends oxAdminView
/** /**
* ToDo: has to be refactored * ToDo: has to be refactored
* @return array * @return array
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/ */
public function getLangList() public function getLangList()
{ {
@ -210,12 +228,12 @@ class d3_country_geoip extends oxAdminView
) { ) {
$sShopId = $this->oCountry->getFieldData('d3geoipshop'); $sShopId = $this->oCountry->getFieldData('d3geoipshop');
} else { } else {
$sShopId = oxRegistry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId(); $sShopId = Registry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId();
} }
$aLanguages = array(); $aLanguages = array();
$aLangParams = oxRegistry::getConfig()->getShopConfVar('aLanguageParams', $sShopId); $aLangParams = Registry::getConfig()->getShopConfVar('aLanguageParams', $sShopId);
$aConfLanguages = oxRegistry::getConfig()->getShopConfVar('aLanguages', $sShopId); $aConfLanguages = Registry::getConfig()->getShopConfVar('aLanguages', $sShopId);
if (is_array($aConfLanguages)) { if (is_array($aConfLanguages)) {
$i = 0; $i = 0;

Voir le fichier

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -15,7 +14,17 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3GeoIP extends oxBase namespace D3\GeoIp\Application\Model;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Log\d3log;
use OxidEsales\Eshop\Application\Model\Country;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Model\BaseModel;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
class d3geoip extends BaseModel
{ {
protected $_sClassName = 'd3geoip'; protected $_sClassName = 'd3geoip';
private $_sModId = 'd3_geoip'; private $_sModId = 'd3_geoip';
@ -31,16 +40,19 @@ class d3GeoIP extends oxBase
$this->init('d3geoip'); $this->init('d3geoip');
} }
/** /**
* get oxcountry object by given IP address (optional) * get oxcountry object by given IP address (optional)
* *
* @param string $sIP optional * @param string $sIP optional
* *
* @return oxcountry * @return oxcountry
* @throws d3_cfg_mod_exception * @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws oxConnectionException * @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws oxSystemComponentException * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
*/
public function getUserLocationCountryObject($sIP = null) public function getUserLocationCountryObject($sIP = null)
{ {
if (!$this->oCountry) { if (!$this->oCountry) {
@ -50,7 +62,7 @@ class d3GeoIP extends oxBase
$sIP = $this->getIP(); $sIP = $this->getIP();
} }
$sISOAlpha = $this->loadByIP(oxRegistry::getConfig()->checkParamSpecialChars($sIP)); $sISOAlpha = $this->loadByIP(Registry::getConfig()->checkParamSpecialChars($sIP));
if (!$sISOAlpha) { if (!$sISOAlpha) {
$this->_getLog()->log( $this->_getLog()->log(
@ -80,12 +92,14 @@ class d3GeoIP extends oxBase
return $this->oCountry; return $this->oCountry;
} }
/** /**
* get IP address from client or set test IP address * get IP address from client or set test IP address
* *
* @return string * @return string
* @throws d3_cfg_mod_exception * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function getIP() public function getIP()
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
@ -123,17 +137,17 @@ class d3GeoIP extends oxBase
stopProfile(__METHOD__); stopProfile(__METHOD__);
return oxRegistry::getConfig()->checkParamSpecialChars($sIP); return Registry::getConfig()->checkParamSpecialChars($sIP);
} }
/** /**
* get ISO alpha 2 ID by IP address * get ISO alpha 2 ID by IP address
* *
* @param int $sIP IP address * @param int $sIP IP address
* *
* @return string * @return string
* @throws oxConnectionException * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/ */
public function loadByIP($sIP) public function loadByIP($sIP)
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
@ -156,44 +170,47 @@ class d3GeoIP extends oxBase
0 0
) BETWEEN D3STARTIPBIN AND D3ENDIPBIN"; ) BETWEEN D3STARTIPBIN AND D3ENDIPBIN";
$sISO = oxDb::getDb()->getOne($sSelect); $oDB = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
$sISO = $oDB->getOne($sSelect);
stopProfile(__METHOD__); stopProfile(__METHOD__);
return $sISO; return $sISO;
} }
/** /**
* get oxcountry object by ISO alpha 2 ID * get Country object by ISO alpha 2 ID
* *
* @param string $sISOAlpha * @param string $sISOAlpha
* *
* @return oxcountry * @return Country
* @throws oxConnectionException * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws oxSystemComponentException */
*/
public function getCountryObject($sISOAlpha) public function getCountryObject($sISOAlpha)
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
$oCountry = oxNew('oxcountry'); /** @var Country $oCountry */
$oCountry = oxNew(Country::class);
$sSelect = "SELECT oxid FROM ".$oCountry->getViewName(). $sSelect = "SELECT oxid FROM ".$oCountry->getViewName().
" WHERE OXISOALPHA2 = '".$sISOAlpha."' AND OXACTIVE = '1'"; " WHERE OXISOALPHA2 = '".$sISOAlpha."' AND OXACTIVE = '1'";
$oCountry->load(oxDb::getDb()->getOne($sSelect)); $oDB = DatabaseProvider::getDb();
$oCountry->load($oDB->getOne($sSelect));
stopProfile(__METHOD__); stopProfile(__METHOD__);
return $oCountry; return $oCountry;
} }
/** /**
* get oxcountry object for fallback, if set * get Country object for fallback, if set
* *
* @return oxcountry * @return oxcountry
* @throws d3_cfg_mod_exception * @throws \Doctrine\DBAL\DBALException
* @throws oxSystemComponentException * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function getCountryFallBackObject() public function getCountryFallBackObject()
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
@ -211,13 +228,18 @@ class d3GeoIP extends oxBase
return $oCountry; return $oCountry;
} }
/** /**
* check module active state and set user country specific language * check module active state and set user country specific language
* *
* @throws d3_cfg_mod_exception * @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws oxConnectionException * @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws oxSystemComponentException * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
* @throws oxConnectionException
* @throws oxSystemComponentException
*/
public function setCountryLanguage() public function setCountryLanguage()
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
@ -234,9 +256,9 @@ class d3GeoIP extends oxBase
$oCountry = $this->getUserLocationCountryObject(); $oCountry = $this->getUserLocationCountryObject();
if (!$this->isAdmin() if (!$this->isAdmin()
&& oxRegistry::getUtils()->isSearchEngine() === false && Registry::getUtils()->isSearchEngine() === false
&& oxRegistry::getSession()->getId() && Registry::getSession()->getId()
&& oxRegistry::getSession()->getVariable('d3isSetLang') === null && Registry::getSession()->getVariable('d3isSetLang') === null
&& $oCountry->getId() && $oCountry->getFieldData('d3geoiplang') > -1 && $oCountry->getId() && $oCountry->getFieldData('d3geoiplang') > -1
) { ) {
$this->_getLog()->log( $this->_getLog()->log(
@ -247,21 +269,26 @@ class d3GeoIP extends oxBase
'set language', 'set language',
$this->getIP().' => '.$oCountry->getFieldData('d3geoiplang') $this->getIP().' => '.$oCountry->getFieldData('d3geoiplang')
); );
oxRegistry::getLang()->setTplLanguage((int) $oCountry->getFieldData('d3geoiplang')); Registry::getLang()->setTplLanguage((int) $oCountry->getFieldData('d3geoiplang'));
oxRegistry::getLang()->setBaseLanguage((int) $oCountry->getFieldData('d3geoiplang')); Registry::getLang()->setBaseLanguage((int) $oCountry->getFieldData('d3geoiplang'));
oxRegistry::getSession()->setVariable('d3isSetLang', true); Registry::getSession()->setVariable('d3isSetLang', true);
} }
stopProfile(__METHOD__); stopProfile(__METHOD__);
} }
/** /**
* check module active state and set user country specific currency * check module active state and set user country specific currency
* *
* @throws d3_cfg_mod_exception * @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws oxConnectionException * @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws oxSystemComponentException * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
* @throws oxConnectionException
* @throws oxSystemComponentException
*/
public function setCountryCurrency() public function setCountryCurrency()
{ {
if (!$this->_getModConfig()->isActive() if (!$this->_getModConfig()->isActive()
@ -275,8 +302,8 @@ class d3GeoIP extends oxBase
$oCountry = $this->getUserLocationCountryObject(); $oCountry = $this->getUserLocationCountryObject();
if (!$this->isAdmin() if (!$this->isAdmin()
&& oxRegistry::getUtils()->isSearchEngine() === false && Registry::getUtils()->isSearchEngine() === false
&& !oxRegistry::getSession()->getVariable('d3isSetCurr') && !Registry::getSession()->getVariable('d3isSetCurr')
&& $oCountry->getId() && $oCountry->getId()
&& $oCountry->getFieldData('d3geoipcur') > -1 && $oCountry->getFieldData('d3geoipcur') > -1
) { ) {
@ -288,8 +315,8 @@ class d3GeoIP extends oxBase
'set currency', 'set currency',
$this->getIP().' => '.$oCountry->getFieldData('d3geoipcur') $this->getIP().' => '.$oCountry->getFieldData('d3geoipcur')
); );
oxRegistry::getConfig()->setActShopCurrency((int) $oCountry->getFieldData('d3geoipcur')); Registry::getConfig()->setActShopCurrency((int) $oCountry->getFieldData('d3geoipcur'));
oxRegistry::getSession()->setVariable('d3isSetCurr', true); Registry::getSession()->setVariable('d3isSetCurr', true);
} }
stopProfile(__METHOD__); stopProfile(__METHOD__);
@ -315,13 +342,18 @@ class d3GeoIP extends oxBase
return false; return false;
} }
/** /**
* check module active state and perform switching to user country specific shop (EE only) * check module active state and perform switching to user country specific shop (EE only)
* *
* @throws d3_cfg_mod_exception * @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws oxConnectionException * @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws oxSystemComponentException * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
* @throws oxConnectionException
* @throws oxSystemComponentException
*/
public function performShopSwitch() public function performShopSwitch()
{ {
if (!$this->_getModConfig()->isActive() || !$this->_getModConfig()->getValue('blChangeShop')) { if (!$this->_getModConfig()->isActive() || !$this->_getModConfig()->getValue('blChangeShop')) {
@ -333,15 +365,15 @@ class d3GeoIP extends oxBase
$oCountry = $this->getUserLocationCountryObject(); $oCountry = $this->getUserLocationCountryObject();
$iNewShop = $oCountry->getFieldData('d3geoipshop'); $iNewShop = $oCountry->getFieldData('d3geoipshop');
if (oxRegistry::getConfig()->getRequestParameter('d3redirect') != 1 if (Registry::get(Request::class)->getRequestParameter('d3redirect') != 1
&& false == $this->isAdmin() && false == $this->isAdmin()
&& oxRegistry::getUtils()->isSearchEngine() === false && Registry::getUtils()->isSearchEngine() === false
&& $oCountry->getId() && $oCountry->getId()
&& $this->getConfig()->isMall() && $this->getConfig()->isMall()
&& $iNewShop > -1 && && $iNewShop > -1 &&
( (
$iNewShop != $this->getConfig()->getShopId() $iNewShop != $this->getConfig()->getShopId()
|| strtolower($this->getConfig()->getActiveView()->getClassName()) == 'mallstart' || strtolower($this->getConfig()->getActiveView()->getClassKey()) == 'mallstart'
) )
) { ) {
$oNewConf = new oxConfig(); $oNewConf = new oxConfig();
@ -350,7 +382,7 @@ class d3GeoIP extends oxBase
$this->getConfig()->onShopChange(); $this->getConfig()->onShopChange();
if (!oxRegistry::getSession()->getVariable('d3isSetLang') if (!Registry::getSession()->getVariable('d3isSetLang')
&& $this->_getModConfig()->getValue('blChangeLang') && $this->_getModConfig()->getValue('blChangeLang')
&& $oCountry->getFieldData('d3geoiplang') > -1 && $oCountry->getFieldData('d3geoiplang') > -1
) { ) {
@ -360,10 +392,10 @@ class d3GeoIP extends oxBase
} }
/** @var $oStr d3str */ /** @var $oStr d3str */
$oStr = oxRegistry::get('d3str'); $oStr = Registry::get('d3str');
$aParams = array( $aParams = array(
'd3redirect' => '1', 'd3redirect' => '1',
'fnc' => oxRegistry::getConfig()->getRequestParameter('fnc'), 'fnc' => Registry::get(Request::class)->getRequestParameter('fnc'),
'shp' => $iNewShop 'shp' => $iNewShop
); );
$sUrl = str_replace( $sUrl = str_replace(
@ -388,13 +420,18 @@ class d3GeoIP extends oxBase
stopProfile(__METHOD__); stopProfile(__METHOD__);
} }
/** /**
* check module active state and perform switching to user country specific url * check module active state and perform switching to user country specific url
* *
* @throws d3_cfg_mod_exception * @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws oxConnectionException * @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws oxSystemComponentException * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
* @throws oxConnectionException
* @throws oxSystemComponentException
*/
public function performURLSwitch() public function performURLSwitch()
{ {
if (!$this->_getModConfig()->isActive() if (!$this->_getModConfig()->isActive()
@ -407,7 +444,7 @@ class d3GeoIP extends oxBase
$oCountry = $this->getUserLocationCountryObject(); $oCountry = $this->getUserLocationCountryObject();
if (false == $this->isAdmin() if (false == $this->isAdmin()
&& oxRegistry::getUtils()->isSearchEngine() === false && Registry::getUtils()->isSearchEngine() === false
&& $oCountry->getId() && $oCountry->getId()
&& $oCountry->getFieldData('d3geoipurl') && $oCountry->getFieldData('d3geoipurl')
&& strlen(trim($oCountry->getFieldData('d3geoipurl'))) > 0 && strlen(trim($oCountry->getFieldData('d3geoipurl'))) > 0
@ -453,23 +490,27 @@ class d3GeoIP extends oxBase
return $aShopUrls; return $aShopUrls;
} }
/** /**
* get modcfg instance * get modcfg instance
* *
* @return d3_cfg_mod * @return d3_cfg_mod
* @throws d3_cfg_mod_exception * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
protected function _getModConfig() protected function _getModConfig()
{ {
return d3_cfg_mod::get($this->_sModId); return d3_cfg_mod::get($this->_sModId);
} }
/** /**
* get d3log instance * get d3log instance
* *
* @return d3log * @return d3log
* @throws d3_cfg_mod_exception * @throws \Doctrine\DBAL\DBALException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
protected function _getLog() protected function _getLog()
{ {
if (!$this->oD3Log) { if (!$this->oD3Log) {

Voir le fichier

@ -1,71 +1,71 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <ds@shopmodule.com> * @author D3 Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
$sLangName = 'Deutsch'; $sLangName = 'Deutsch';
$iLangNr = 0; $iLangNr = 0;
// ------------------------------- // -------------------------------
// RESOURCE IDENTITFIER = STRING // RESOURCE IDENTITFIER = STRING
// ------------------------------- // -------------------------------
$aLang = array( $aLang = array(
'charset' => 'ISO-8859-15', 'charset' => 'UTF-8',
'd3mxgeoip' => "<i class='fa fa-globe'></i> GeoIP", 'd3mxgeoip' => "<i class='fa fa-globe'></i> GeoIP",
'd3mxgeoip_settings' => 'Einstellungen', 'd3mxgeoip_settings' => 'Einstellungen',
'd3tbclgeoip_settings_main' => 'Grundeinstellungen', 'd3tbclgeoip_settings_main' => 'Grundeinstellungen',
'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen', 'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen',
'D3_GEOIP_TRANSL' => 'GeoIP-Kundenumleitungen', 'D3_GEOIP_TRANSL' => 'GeoIP-Kundenumleitungen',
'D3_GEOIP_SET_DEBUG_DESC' => 'Mit aktiviertem Debug-Modus wird im Frontend die aktuelle '. 'D3_GEOIP_SET_DEBUG_DESC' => 'Mit aktiviertem Debug-Modus wird im Frontend die aktuelle '.
'IP-Adresse des Shopbesuchers gezeigt. Beachten Sie, dass Umleitungen, die auf Weiterleitungen basieren, dann '. 'IP-Adresse des Shopbesuchers gezeigt. Beachten Sie, dass Umleitungen, die auf Weiterleitungen basieren, dann '.
'nicht ausgeführt werden können.', 'nicht ausgeführt werden können.',
'D3_GEOIP_SET_OPTIONS' => 'Optionen', 'D3_GEOIP_SET_OPTIONS' => 'Optionen',
'D3_GEOIP_SET_OPTIONS_CHANGESHOP' => 'Mandant wechseln, wenn eingestellt (nur EE)', 'D3_GEOIP_SET_OPTIONS_CHANGESHOP' => 'Mandant wechseln, wenn eingestellt (nur EE)',
'D3_GEOIP_SET_OPTIONS_CHANGECURR' => 'Währung wechseln, wenn eingestellt', 'D3_GEOIP_SET_OPTIONS_CHANGECURR' => 'Währung wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_CHANGELANG' => 'Sprache wechseln, wenn eingestellt', 'D3_GEOIP_SET_OPTIONS_CHANGELANG' => 'Sprache wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_CHANGEURL' => 'URL wechseln, wenn eingestellt', 'D3_GEOIP_SET_OPTIONS_CHANGEURL' => 'URL wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_NOCOUNTRY' => 'Shop verwendet die Einstellung dieses Landes, wenn IP nicht '. 'D3_GEOIP_SET_OPTIONS_NOCOUNTRY' => 'Shop verwendet die Einstellung dieses Landes, wenn IP nicht '.
'zuzuordnen ist', 'zuzuordnen ist',
'D3_GEOIP_SET_IP' => 'IP-Einstellungen', 'D3_GEOIP_SET_IP' => 'IP-Einstellungen',
'D3_GEOIP_SET_IP_TESTIP' => 'statt Kunden-IP immer diese IP-Adresse verwenden', 'D3_GEOIP_SET_IP_TESTIP' => 'statt Kunden-IP immer diese IP-Adresse verwenden',
'D3_GEOIP_SET_IP_TESTCOUNTRY' => 'statt Kunden-IP immer eine IP-Adresse dieses Landes verwenden', 'D3_GEOIP_SET_IP_TESTCOUNTRY' => 'statt Kunden-IP immer eine IP-Adresse dieses Landes verwenden',
'D3_GEOIP_SET_IP_TESTCOUNTRY_INACTIVE' => '(inaktiv)', 'D3_GEOIP_SET_IP_TESTCOUNTRY_INACTIVE' => '(inaktiv)',
'D3_GEOIP_SET_IP_CHECKIP' => 'diese IP-Adresse prüfen', 'D3_GEOIP_SET_IP_CHECKIP' => 'diese IP-Adresse prüfen',
'D3_GEOIP_SET_IP_CHECKIP_NOTSET' => 'IP nicht zugewiesen oder Land nicht aktiv', 'D3_GEOIP_SET_IP_CHECKIP_NOTSET' => 'IP nicht zugewiesen oder Land nicht aktiv',
'D3_GENERAL_GEOIP_SAVE' => 'Speichern', 'D3_GENERAL_GEOIP_SAVE' => 'Speichern',
'D3_GEOIP_SELSHOP' => 'zuständiger Shop', 'D3_GEOIP_SELSHOP' => 'zuständiger Shop',
'D3_GEOIP_SELLANG' => 'vorgewählte Sprache', 'D3_GEOIP_SELLANG' => 'vorgewählte Sprache',
'D3_GEOIP_SELCUR' => 'vorgewählte Währung', 'D3_GEOIP_SELCUR' => 'vorgewählte Währung',
'D3_GEOIP_CUSTSELSHOP' => ' - vom Kunden gewählter Shop - ', 'D3_GEOIP_CUSTSELSHOP' => ' - vom Kunden gewählter Shop - ',
'D3_GEOIP_CUSTSELLANG' => ' - vom Kunden gewählte Sprache - ', 'D3_GEOIP_CUSTSELLANG' => ' - vom Kunden gewählte Sprache - ',
'D3_GEOIP_CUSTSELCUR' => ' - vom Kunden gewählte Währung - ', 'D3_GEOIP_CUSTSELCUR' => ' - vom Kunden gewählte Währung - ',
'D3_GEOIP_OR' => 'oder', 'D3_GEOIP_OR' => 'oder',
'D3_GEOIP_DISABLED' => '(deaktiviert)', 'D3_GEOIP_DISABLED' => '(deaktiviert)',
'D3_GEOIP_SELURL' => 'zu wechselnde URL', 'D3_GEOIP_SELURL' => 'zu wechselnde URL',
'D3_GEOIP_SELURL_DESC' => 'Sobald im URL-Feld eine Eingabe vorhanden ist, wird bei '. 'D3_GEOIP_SELURL_DESC' => 'Sobald im URL-Feld eine Eingabe vorhanden ist, wird bei '.
'passenden Kunden versucht, zur hinterlegten URL zu wechseln. Möchten Sie den Mandanten, die Währung und / '. 'passenden Kunden versucht, zur hinterlegten URL zu wechseln. Möchten Sie den Mandanten, die Währung und / '.
'oder die Sprache einstellen, entfernen Sie die URL.<br><br>Aktivieren / deaktivieren Sie den URL-Wechsel '. 'oder die Sprache einstellen, entfernen Sie die URL.<br><br>Aktivieren / deaktivieren Sie den URL-Wechsel '.
'zusätzlich in den Modul-Grundeinstellungen.', 'zusätzlich in den Modul-Grundeinstellungen.',
'D3_GEOIP_METADATA_TITLE' => 'D³ GeoIP Vorauswahl', 'D3_GEOIP_METADATA_TITLE' => 'D³ GeoIP Vorauswahl',
'D3_GEOIP_METADATA_DESC' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.', 'D3_GEOIP_METADATA_DESC' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.',
'D3_GEOIP_UPDATE_ITEMINSTALL' => 'Die umfangreiche IP-Liste kann leider nicht über die '. 'D3_GEOIP_UPDATE_ITEMINSTALL' => 'Die umfangreiche IP-Liste kann leider nicht über die '.
'automatische Installation eingebunden werden. Bitte installieren Sie diese manuell. '.PHP_EOL.PHP_EOL. 'automatische Installation eingebunden werden. Bitte installieren Sie diese manuell. '.PHP_EOL.PHP_EOL.
'Laden Sie bitte die aktuellen CSV-Daten des Anbieters Maxmind. In "setup+doku/importCSVtoMySQL" des Modulpaketes finden Sie weitere Informationen und die erforderlichen Datenbank-Befehle, um die nötigen Daten zu generieren.'.PHP_EOL.PHP_EOL. 'Laden Sie bitte die aktuellen CSV-Daten des Anbieters Maxmind. In "setup+doku/importCSVtoMySQL" des Modulpaketes finden Sie weitere Informationen und die erforderlichen Datenbank-Befehle, um die nötigen Daten zu generieren.'.PHP_EOL.PHP_EOL.
'Alternativ finden Sie die erforderlichen Daten im Installationspaket des Moduls unter "setup+doku/geoip-data_*". '.PHP_EOL.PHP_EOL. 'Alternativ finden Sie die erforderlichen Daten im Installationspaket des Moduls unter "setup+doku/geoip-data_*". '.PHP_EOL.PHP_EOL.
'Führen Sie die SQL-Datei(en) bitte in Ihrer Datenbank aus.', 'Führen Sie die SQL-Datei(en) bitte in Ihrer Datenbank aus.',
); );

Voir le fichier

@ -1,118 +1,118 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] [{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
window.onload = function () window.onload = function ()
{ {
[{if $updatelist == 1}] [{if $updatelist == 1}]
top.oxid.admin.updateList('[{$oxid}]'); top.oxid.admin.updateList('[{$oxid}]');
[{/if}] [{/if}]
var oField = top.oxid.admin.getLockTarget(); var oField = top.oxid.admin.getLockTarget();
oField.onchange = oField.onkeyup = oField.onmouseout = top.oxid.admin.unlockSave; oField.onchange = oField.onkeyup = oField.onmouseout = top.oxid.admin.unlockSave;
} }
//--> //-->
</script> </script>
[{if $readonly}] [{if $readonly}]
[{assign var="readonly" value="readonly disabled"}] [{assign var="readonly" value="readonly disabled"}]
[{else}] [{else}]
[{assign var="readonly" value=""}] [{assign var="readonly" value=""}]
[{/if}] [{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post"> <form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]"> <input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="oxidCopy" value="[{$oxid}]"> <input type="hidden" name="oxidCopy" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]"> <input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="language" value="[{$actlang}]"> <input type="hidden" name="language" value="[{$actlang}]">
</form> </form>
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post"> <form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]"> <input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value=""> <input type="hidden" name="fnc" value="">
<input type="hidden" name="oxid" value="[{$oxid}]"> <input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="voxid" value="[{$oxid}]"> <input type="hidden" name="voxid" value="[{$oxid}]">
<input type="hidden" name="oxparentid" value="[{$oxparentid}]"> <input type="hidden" name="oxparentid" value="[{$oxparentid}]">
<input type="hidden" name="editval[oxcountry__oxid]" value="[{$oxid}]"> <input type="hidden" name="editval[oxcountry__oxid]" value="[{$oxid}]">
<input type="hidden" name="language" value="[{$actlang}]"> <input type="hidden" name="language" value="[{$actlang}]">
<table cellspacing="0" cellpadding="0" border="0" width="98%"> <table cellspacing="0" cellpadding="0" border="0" width="98%">
<tr> <tr>
<td valign="top" class="edittext" style="width: 45%"> <td valign="top" class="edittext" style="width: 45%">
<table cellspacing="0" cellpadding="0" border="0"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td class="edittext" width="120"> <td class="edittext" width="120">
<label for="d3geoipshop">[{oxmultilang ident="D3_GEOIP_SELSHOP"}]:</label> <label for="d3geoipshop">[{oxmultilang ident="D3_GEOIP_SELSHOP"}]:</label>
</td> </td>
<td class="edittext"> <td class="edittext">
<SELECT id="d3geoipshop" name="editval[oxcountry__d3geoipshop]" class="edittext" onchange="document.getElementById('myedit').fnc.value = 'saveshop'; document.getElementById('myedit').submit();" [{if !$oView->getModCfgValue('blChangeShop')}]disabled[{/if}]> <SELECT id="d3geoipshop" name="editval[oxcountry__d3geoipshop]" class="edittext" onchange="document.getElementById('myedit').fnc.value = 'saveshop'; document.getElementById('myedit').submit();" [{if !$oView->getModCfgValue('blChangeShop')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELSHOP"}]</option> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELSHOP"}]</option>
[{foreach from=$oView->getShopList() item=shop}] [{foreach from=$oView->getShopList() item=shop}]
<option value="[{$shop->oxshops__oxid->value}]" [{if $edit->oxcountry__d3geoipshop->value == $shop->oxshops__oxid->value}]selected[{/if}]>[{$shop->oxshops__oxname->value}]</option> <option value="[{$shop->oxshops__oxid->value}]" [{if $edit->oxcountry__d3geoipshop->value == $shop->oxshops__oxid->value}]selected[{/if}]>[{$shop->oxshops__oxname->value}]</option>
[{/foreach}] [{/foreach}]
</SELECT>[{if !$oView->getModCfgValue('blChangeShop')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}] </SELECT>[{if !$oView->getModCfgValue('blChangeShop')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="edittext"> <td class="edittext">
<label for="d3geoiplang">[{oxmultilang ident="D3_GEOIP_SELLANG"}]:</label> <label for="d3geoiplang">[{oxmultilang ident="D3_GEOIP_SELLANG"}]:</label>
</td> </td>
<td class="edittext"> <td class="edittext">
<SELECT id="d3geoiplang" name="editval[oxcountry__d3geoiplang]" class="edittext" [{if !$oView->getModCfgValue('blChangeLang')}]disabled[{/if}]> <SELECT id="d3geoiplang" name="editval[oxcountry__d3geoiplang]" class="edittext" [{if !$oView->getModCfgValue('blChangeLang')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELLANG"}]</option> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELLANG"}]</option>
[{foreach from=$oView->getLangList() item=lang}] [{foreach from=$oView->getLangList() item=lang}]
<option value="[{$lang->id}]" [{if $edit->oxcountry__d3geoiplang->value == $lang->id}]selected[{/if}]>[{$lang->name}]</option> <option value="[{$lang->id}]" [{if $edit->oxcountry__d3geoiplang->value == $lang->id}]selected[{/if}]>[{$lang->name}]</option>
[{/foreach}] [{/foreach}]
</SELECT>[{if !$oView->getModCfgValue('blChangeLang')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}] </SELECT>[{if !$oView->getModCfgValue('blChangeLang')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="edittext"> <td class="edittext">
<label for="d3geoipcur">[{oxmultilang ident="D3_GEOIP_SELCUR"}]:</label> <label for="d3geoipcur">[{oxmultilang ident="D3_GEOIP_SELCUR"}]:</label>
</td> </td>
<td class="edittext"> <td class="edittext">
<SELECT id="d3geoipcur" name="editval[oxcountry__d3geoipcur]" class="edittext" [{if !$oView->getModCfgValue('blChangeCurr')}]disabled[{/if}]> <SELECT id="d3geoipcur" name="editval[oxcountry__d3geoipcur]" class="edittext" [{if !$oView->getModCfgValue('blChangeCurr')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELCUR"}]</option> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELCUR"}]</option>
[{foreach from=$oView->getCurList() item=cur}] [{foreach from=$oView->getCurList() item=cur}]
<option value="[{$cur->id}]" [{if $edit->oxcountry__d3geoipcur->value == $cur->id}]selected[{/if}]>[{$cur->name}] ([{$cur->sign}])</option> <option value="[{$cur->id}]" [{if $edit->oxcountry__d3geoipcur->value == $cur->id}]selected[{/if}]>[{$cur->name}] ([{$cur->sign}])</option>
[{/foreach}] [{/foreach}]
</SELECT>[{if !$oView->getModCfgValue('blChangeCurr')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}] </SELECT>[{if !$oView->getModCfgValue('blChangeCurr')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="edittext"><br><br> <td class="edittext"><br><br>
</td> </td>
<td class="edittext"><br><br> <td class="edittext"><br><br>
<input type="submit" class="edittext" id="oLockButton" name="saveArticle" value="[{oxmultilang ident="GENERAL_SAVE"}]" onClick="Javascript:document.myedit.fnc.value='save'"" [{$readonly}] [{if !$edit->oxcountry__oxtitle->value && !$oxparentid}]disabled[{/if}]><br> <input type="submit" class="edittext" id="oLockButton" name="saveArticle" value="[{oxmultilang ident="GENERAL_SAVE"}]" onClick="Javascript:document.myedit.fnc.value='save'"" [{$readonly}] [{if !$edit->oxcountry__oxtitle->value && !$oxparentid}]disabled[{/if}]><br>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
<td valign="top" class="edittext" align="left" width="10%"> <td valign="top" class="edittext" align="left" width="10%">
[{oxmultilang ident="D3_GEOIP_OR"}] [{oxmultilang ident="D3_GEOIP_OR"}]
</td> </td>
<!-- Anfang rechte Seite --> <!-- Anfang rechte Seite -->
<td valign="top" class="edittext" align="left" width="45%"> <td valign="top" class="edittext" align="left" width="45%">
<table cellspacing="0" cellpadding="0" border="0"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td class="edittext" width="120"> <td class="edittext" width="120">
<label for="d3geoipurl">[{oxmultilang ident="D3_GEOIP_SELURL"}]:</label> <label for="d3geoipurl">[{oxmultilang ident="D3_GEOIP_SELURL"}]:</label>
</td> </td>
<td class="edittext"> <td class="edittext">
<input id="d3geoipurl" type="text" maxlength="255" size="50" name="editval[oxcountry__d3geoipurl]" value="[{$edit->oxcountry__d3geoipurl->value}]" [{if !$oView->getModCfgValue('blChangeURL')}]disabled[{/if}]> [{if !$oView->getModCfgValue('blChangeURL')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}] <input id="d3geoipurl" type="text" maxlength="255" size="50" name="editval[oxcountry__d3geoipurl]" value="[{$edit->oxcountry__d3geoipurl->value}]" [{if !$oView->getModCfgValue('blChangeURL')}]disabled[{/if}]> [{if !$oView->getModCfgValue('blChangeURL')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
[{oxinputhelp ident="D3_GEOIP_SELURL_DESC"}] [{oxinputhelp ident="D3_GEOIP_SELURL_DESC"}]
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
<!-- Ende rechte Seite --> <!-- Ende rechte Seite -->
</tr> </tr>
</table> </table>
</form> </form>
[{include file="bottomnaviitem.tpl"}] [{include file="bottomnaviitem.tpl"}]
[{include file="bottomitem.tpl"}] [{include file="bottomitem.tpl"}]

Voir le fichier

@ -1,21 +1,21 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <ds@shopmodule.com> * @author D3 Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
/** */ /** */
class d3_oxcmp_cur_geoip_parent extends oxcmp_cur {} class d3_oxcmp_cur_geoip_parent extends oxcmp_cur {}
/** */ /** */
class d3_oxcmp_lang_geoip_parent extends oxcmp_lang {} class d3_oxcmp_lang_geoip_parent extends oxcmp_lang {}

Voir le fichier

@ -0,0 +1,30 @@
<?php
namespace D3\GeoIp\Modules\Component;
use D3\GeoIp\Application\Model\d3geoip;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
class d3_oxcmp_lang_geoip extends d3_oxcmp_lang_geoip_parent
{
private $_sModId = 'd3_geoip';
/**
* @throws \D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException
* @throws \D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
*/
public function init()
{
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
/** @var $oLocation d3geoip */
$oLocation = oxNew(d3geoip::class);
$oLocation->setCountryLanguage();
}
parent::init();
}
}

Voir le fichier

@ -1,5 +1,4 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
@ -15,6 +14,10 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
namespace D3\GeoIp\Modules\Controller;
use OxidEsales\Eshop\Core\Registry;
class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
{ {
/** /**
@ -37,7 +40,7 @@ class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
{ {
startProfile(__METHOD__); startProfile(__METHOD__);
$aUserComponentNames = oxRegistry::getConfig()->getConfigParam('aUserComponentNames'); $aUserComponentNames = Registry::getConfig()->getConfigParam('aUserComponentNames');
$sGeoIpCmpName = 'd3cmp_geoip'; $sGeoIpCmpName = 'd3cmp_geoip';
$blDontUseCache = 1; $blDontUseCache = 1;
@ -47,7 +50,7 @@ class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
if (false == in_array($sGeoIpCmpName, array_keys($aUserComponentNames))) { if (false == in_array($sGeoIpCmpName, array_keys($aUserComponentNames))) {
$aUserComponentNames[$sGeoIpCmpName] = $blDontUseCache; $aUserComponentNames[$sGeoIpCmpName] = $blDontUseCache;
oxRegistry::getConfig()->setConfigParam('aUserComponentNames', $aUserComponentNames); Registry::getConfig()->setConfigParam('aUserComponentNames', $aUserComponentNames);
} }
stopProfile(__METHOD__); stopProfile(__METHOD__);

Voir le fichier

@ -14,6 +14,18 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
namespace D3\GeoIp\Setup;
use D3\ModCfg\Application\Model\Install\d3install_updatebase;
use D3\ModCfg\Application\Model\Installwizzard\d3installdbfield;
use D3\ModCfg\Application\Model\Installwizzard\d3installdbrecord;
use d3\modcfg\Application\Model\d3database;
use D3\ModCfg\Application\Model\Installwizzard\d3installdbtable;
use OxidEsales\Eshop\Application\Model\Shop;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Facts\Facts;
class d3geoip_update extends d3install_updatebase class d3geoip_update extends d3install_updatebase
{ {
public $sModKey = 'd3_geoip'; public $sModKey = 'd3_geoip';
@ -249,7 +261,7 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
public function hasDeleteGeoIpTableFields() public function hasDeleteGeoIpTableFields()
{ {
/** @var d3installdbfield $oInstallDbField */ /** @var d3installdbfield $oInstallDbField */
$oInstallDbField = oxNew('d3installdbfield', $this); $oInstallDbField = oxNew(d3installdbfield::class, $this);
return $oInstallDbField->checkDeleteFields(); return $oInstallDbField->checkDeleteFields();
} }
@ -262,7 +274,7 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
$blRet = false; $blRet = false;
if ($this->hasDeleteGeoIpTableFields()) { if ($this->hasDeleteGeoIpTableFields()) {
/** @var d3installdbfield $oInstallDbField */ /** @var d3installdbfield $oInstallDbField */
$oInstallDbField = oxNew('d3installdbfield', $this); $oInstallDbField = oxNew(d3installdbfield::class, $this);
$blRet = $oInstallDbField->fixDeleteFields(__METHOD__); $blRet = $oInstallDbField->fixDeleteFields(__METHOD__);
} }
@ -276,7 +288,7 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
public function checkGeoIpTableEngine() public function checkGeoIpTableEngine()
{ {
/** @var d3installdbtable $oDbTable */ /** @var d3installdbtable $oDbTable */
$oDbTable = oxNew('d3installdbtable', $this); $oDbTable = oxNew(d3installdbtable::class, $this);
$aData = $oDbTable->getTableData('d3geoip'); $aData = $oDbTable->getTableData('d3geoip');
if (isset($aData) && count($aData) && isset($aData['ENGINE']) && $aData['ENGINE'] == 'InnoDB') { if (isset($aData) && count($aData) && isset($aData['ENGINE']) && $aData['ENGINE'] == 'InnoDB') {
@ -286,14 +298,15 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
return true; return true;
} }
/** /**
* @return bool * @return bool
* @throws oxSystemComponentException * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function updateGeoIpTableEngine() public function updateGeoIpTableEngine()
{ {
/** @var d3installdbtable $oDbTable */ /** @var d3installdbtable $oDbTable */
$oDbTable = oxNew('d3installdbtable', $this); $oDbTable = oxNew(d3installdbtable::class, $this);
$blRet = $oDbTable->changeTableEngine('d3geoip', 'InnoDB'); $blRet = $oDbTable->changeTableEngine('d3geoip', 'InnoDB');
return $blRet; return $blRet;
} }
@ -322,6 +335,8 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
/** /**
* @return bool * @return bool
* @throws \Doctrine\DBAL\DBALException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/ */
public function checkModCfgItemExist() public function checkModCfgItemExist()
{ {
@ -430,7 +445,7 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
), ),
array ( array (
'fieldname' => 'OXSHOPVERSION', 'fieldname' => 'OXSHOPVERSION',
'content' => oxRegistry::getConfig()->getEdition(), 'content' => Registry::getConfig()->getEdition(),
'force_update' => true, 'force_update' => true,
'use_quote' => true, 'use_quote' => true,
'use_multilang' => false, 'use_multilang' => false,
@ -516,7 +531,7 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
*/ */
public function checkRegisteredComponent() public function checkRegisteredComponent()
{ {
/** @var $oShop oxshop */ /** @var $oShop Shop */
foreach ($this->getShopListByActiveModule('d3geoip') as $oShop) { foreach ($this->getShopListByActiveModule('d3geoip') as $oShop) {
$aUserComponents = $this->_d3GetUserComponentsFromDb($oShop); $aUserComponents = $this->_d3GetUserComponentsFromDb($oShop);
@ -557,25 +572,26 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
return $blRet; return $blRet;
} }
/** /**
* @param oxShop $oShop * @param Shop $oShop
* *
* @return array|null * @return array|null
* @throws oxConnectionException * @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/ * @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
protected function _d3GetUserComponentsFromDb(oxShop $oShop) */
protected function _d3GetUserComponentsFromDb(Shop $oShop)
{ {
$sVarName = 'aUserComponentNames'; $sVarName = 'aUserComponentNames';
$sModuleId = ''; $sModuleId = '';
$oDb = oxDb::getDb(oxDb::FETCH_MODE_ASSOC); $oDb = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
$sSelect = "SELECT oxvartype as type, ".oxRegistry::getConfig()->getDecodeValueQuery(). $sSelect = "SELECT oxvartype as type, ".Registry::getConfig()->getDecodeValueQuery().
" as value FROM `oxconfig` WHERE oxshopid = ".$oDb->quote($oShop->getId()). " as value FROM `oxconfig` WHERE oxshopid = ".$oDb->quote($oShop->getId()).
" AND oxvarname = ".$oDb->quote($sVarName). " AND oxvarname = ".$oDb->quote($sVarName).
" AND oxmodule = ".$oDb->quote($sModuleId); " AND oxmodule = ".$oDb->quote($sModuleId);
$aResult = $oDb->getAll($sSelect); $aResult = $oDb->getAll($sSelect);
$aUserComponents = is_array($aResult) && count($aResult) $aUserComponents = is_array($aResult) && count($aResult)
? oxRegistry::getConfig()->decodeValue($aResult[0]['type'], $aResult[0]['value']) ? Registry::getConfig()->decodeValue($aResult[0]['type'], $aResult[0]['value'])
: null; : null;
return $aUserComponents; return $aUserComponents;

Voir le fichier

@ -0,0 +1,37 @@
{
"name": "d3/geoip",
"description": "D3: GeoIp",
"type": "oxideshop-module",
"version": "1.0",
"keywords": [
"oxid",
"modules",
"eShop",
"d3"
],
"authors": [
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "http://www.d3data.de",
"role": "Owner"
}
],
"support": {
"email": "support@shopmodule.com"
},
"homepage": "https://www.oxidmodule.com/",
"license": [
"proprietary"
],
"extra": {
"source-directory": "/",
"target-directory": "d3/geoip"
},
"require": {},
"autoload": {
"psr-4": {
"D3\\GeoIp\\": "../../../../source/modules/d3/geoip"
}
}
}

Voir le fichier

@ -0,0 +1,69 @@
<?php
/**
* Metadata version
*/
$sMetadataVersion = '2.0';
use D3\GeoIp\Application\Component\d3cmp_geoip;
use D3\GeoIp\Application\Controller\Admin\d3_cfg_geoipset;
use D3\GeoIp\Application\Controller\Admin\d3_cfg_geoipset_licence;
use D3\GeoIp\Application\Controller\Admin\d3_cfg_geoipset_list;
use D3\GeoIp\Application\Controller\Admin\d3_cfg_geoipset_main;
use D3\GeoIp\Application\Controller\Admin\d3_country_geoip;
use D3\GeoIp\Application\Model\d3geoip;
use D3\GeoIp\Modules\Component\d3_oxcmp_lang_geoip;
use D3\GeoIp\Modules\Controller\d3_oxshopcontrol_geoip;
use D3\GeoIp\Setup as ModuleSetup;
use D3\GeoIp\Setup\d3geoip_update;
use OxidEsales\Eshop\Application\Component\LanguageComponent;
use OxidEsales\Eshop\Core\ShopControl;
$sD3Logo = (class_exists(d3\modcfg\Application\Model\d3utils::class) ? d3\modcfg\Application\Model\d3utils::getInstance()->getD3Logo() : 'D&sup3;');
/**
* Module information
*/
$aModule = array(
'id' => 'd3geoip',
'title' => $sD3Logo . ' GeoIP Vorauswahl',
'description' => array(
'de' => 'Begr&uuml;&szlig;en Sie Ihre Kunden in seiner Landessprache.',
'en' => '',
),
'thumbnail' => 'picture.png',
'version' => '3.1.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
LanguageComponent::class => d3_oxcmp_lang_geoip::class,
ShopControl::class => d3_oxshopcontrol_geoip::class
),
'controllers' => array(
'd3cmp_geoip' => d3cmp_geoip::class,
'd3_cfg_geoipset' => d3_cfg_geoipset::class,
'd3_cfg_geoipset_list' => d3_cfg_geoipset_list::class,
'd3_cfg_geoipset_main' => d3_cfg_geoipset_main::class,
'd3_cfg_geoipset_licence' => d3_cfg_geoipset_licence::class,
'd3_country_geoip' => d3_country_geoip::class,
'd3geoip' => d3geoip::class,
'd3geoip_update' => d3geoip_update::class,
),
'templates' => array(
'd3_cfg_geoipset_main.tpl' => 'd3/geoip/Application/views/admin/tpl/d3_cfg_geoipset_main.tpl',
'd3_country_geoip.tpl' => 'd3/geoip/Application/views/admin/tpl/d3_country_geoip.tpl',
),
'events' => array(
'onActivate' => '\D3\GeoIp\Setup\Events::onActivate',
),
'blocks' => array(
),
'd3SetupClasses' => array(
d3geoip_update::class,
),
'd3FileRegister' => array(
'd3/geoip/IntelliSenseHelper.php',
'd3/geoip/metadata.php',
'd3/geoip/Application/views/admin/de/d3_geoip_lang.php',
),
);

Voir le fichier

Avant

Largeur:  |  Hauteur:  |  Taille: 11 KiB

Après

Largeur:  |  Hauteur:  |  Taille: 11 KiB