Anpassung auf 6.1.x
This commit is contained in:
parent
bf2e874254
commit
265cd90dd0
@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Metadata version
|
|
||||||
*/
|
|
||||||
$sMetadataVersion = '1.1';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module information
|
|
||||||
*/
|
|
||||||
$aModule = array(
|
|
||||||
'id' => 'd3geoip',
|
|
||||||
'title' => (class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D³') . ' GeoIP Vorauswahl',
|
|
||||||
'description' => array(
|
|
||||||
'de' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.',
|
|
||||||
'en' => '',
|
|
||||||
),
|
|
||||||
'thumbnail' => 'picture.png',
|
|
||||||
'version' => '3.1.0.0',
|
|
||||||
'author' => 'D³ 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',
|
|
||||||
),
|
|
||||||
);
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
@ -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 */
|
@ -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.
|
@ -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';
|
@ -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
|
@ -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()
|
||||||
{
|
{
|
||||||
@ -58,9 +71,9 @@ 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().
|
@ -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;
|
@ -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';
|
||||||
@ -37,9 +46,12 @@ class d3GeoIP extends oxBase
|
|||||||
* @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)
|
||||||
{
|
{
|
||||||
@ -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(
|
||||||
@ -84,7 +96,9 @@ class d3GeoIP extends oxBase
|
|||||||
* 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()
|
||||||
{
|
{
|
||||||
@ -123,7 +137,7 @@ class d3GeoIP extends oxBase
|
|||||||
|
|
||||||
stopProfile(__METHOD__);
|
stopProfile(__METHOD__);
|
||||||
|
|
||||||
return oxRegistry::getConfig()->checkParamSpecialChars($sIP);
|
return Registry::getConfig()->checkParamSpecialChars($sIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,7 +146,7 @@ class d3GeoIP extends oxBase
|
|||||||
* @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)
|
||||||
{
|
{
|
||||||
@ -156,7 +170,8 @@ 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__);
|
||||||
|
|
||||||
@ -164,23 +179,24 @@ class d3GeoIP extends oxBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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__);
|
||||||
|
|
||||||
@ -188,11 +204,12 @@ class d3GeoIP extends oxBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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()
|
||||||
{
|
{
|
||||||
@ -214,7 +231,12 @@ class d3GeoIP extends oxBase
|
|||||||
/**
|
/**
|
||||||
* 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 \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
|
||||||
* @throws oxConnectionException
|
* @throws oxConnectionException
|
||||||
* @throws oxSystemComponentException
|
* @throws oxSystemComponentException
|
||||||
*/
|
*/
|
||||||
@ -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,9 +269,9 @@ 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__);
|
||||||
@ -258,7 +280,12 @@ class d3GeoIP extends oxBase
|
|||||||
/**
|
/**
|
||||||
* 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 \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
|
||||||
* @throws oxConnectionException
|
* @throws oxConnectionException
|
||||||
* @throws oxSystemComponentException
|
* @throws oxSystemComponentException
|
||||||
*/
|
*/
|
||||||
@ -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__);
|
||||||
@ -318,7 +345,12 @@ class d3GeoIP extends oxBase
|
|||||||
/**
|
/**
|
||||||
* 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 \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
|
||||||
* @throws oxConnectionException
|
* @throws oxConnectionException
|
||||||
* @throws oxSystemComponentException
|
* @throws oxSystemComponentException
|
||||||
*/
|
*/
|
||||||
@ -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(
|
||||||
@ -391,7 +423,12 @@ class d3GeoIP extends oxBase
|
|||||||
/**
|
/**
|
||||||
* 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 \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
|
||||||
* @throws oxConnectionException
|
* @throws oxConnectionException
|
||||||
* @throws oxSystemComponentException
|
* @throws oxSystemComponentException
|
||||||
*/
|
*/
|
||||||
@ -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
|
||||||
@ -457,7 +494,9 @@ class d3GeoIP extends oxBase
|
|||||||
* 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()
|
||||||
{
|
{
|
||||||
@ -468,7 +507,9 @@ class d3GeoIP extends oxBase
|
|||||||
* 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()
|
||||||
{
|
{
|
@ -20,7 +20,7 @@ $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',
|
||||||
@ -30,10 +30,10 @@ $aLang = array(
|
|||||||
|
|
||||||
'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 '.
|
||||||
@ -42,30 +42,30 @@ $aLang = array(
|
|||||||
'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.',
|
||||||
);
|
);
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -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__);
|
@ -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') {
|
||||||
@ -288,12 +300,13 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @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);
|
||||||
|
|
||||||
@ -558,24 +573,25 @@ UUrZ3pOeW9TUmo3MDg4dGx0RkRUK0wzb2k=';
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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;
|
37
copy_this/modules/d3/geoip/composer.json
Normal file
37
copy_this/modules/d3/geoip/composer.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
69
copy_this/modules/d3/geoip/metadata.php
Normal file
69
copy_this/modules/d3/geoip/metadata.php
Normal file
@ -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³');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module information
|
||||||
|
*/
|
||||||
|
$aModule = array(
|
||||||
|
'id' => 'd3geoip',
|
||||||
|
'title' => $sD3Logo . ' GeoIP Vorauswahl',
|
||||||
|
'description' => array(
|
||||||
|
'de' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.',
|
||||||
|
'en' => '',
|
||||||
|
),
|
||||||
|
'thumbnail' => 'picture.png',
|
||||||
|
'version' => '3.1.0.0',
|
||||||
|
'author' => 'D³ 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',
|
||||||
|
),
|
||||||
|
);
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user