move changeLanguage to oxcmp_lang because of seldom language errors while query generating
This commit is contained in:
parent
60bfcad932
commit
d452e6ba8e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11,6 +11,7 @@ copy_this/modules/d3/d3geoip/controllers/admin/d3_country_geoip.php -text
|
|||||||
copy_this/modules/d3/d3geoip/menu.xml -text
|
copy_this/modules/d3/d3geoip/menu.xml -text
|
||||||
copy_this/modules/d3/d3geoip/metadata.php -text
|
copy_this/modules/d3/d3geoip/metadata.php -text
|
||||||
copy_this/modules/d3/d3geoip/models/d3geoip.php -text
|
copy_this/modules/d3/d3geoip/models/d3geoip.php -text
|
||||||
|
copy_this/modules/d3/d3geoip/modules/components/d3_oxcmp_lang_geoip.php -text
|
||||||
copy_this/modules/d3/d3geoip/modules/controllers/d3_oxshopcontrol_geoip.php -text
|
copy_this/modules/d3/d3geoip/modules/controllers/d3_oxshopcontrol_geoip.php -text
|
||||||
copy_this/modules/d3/d3geoip/picture.png -text
|
copy_this/modules/d3/d3geoip/picture.png -text
|
||||||
copy_this/modules/d3/d3geoip/setup/d3geoip_update.php -text
|
copy_this/modules/d3/d3geoip/setup/d3geoip_update.php -text
|
||||||
|
@ -37,7 +37,8 @@ class d3cmp_geoip extends oxView
|
|||||||
/** @var $oLocation d3geoip */
|
/** @var $oLocation d3geoip */
|
||||||
$oLocation = oxNew('d3geoip');
|
$oLocation = oxNew('d3geoip');
|
||||||
$oLocation->setCountryCurrency();
|
$oLocation->setCountryCurrency();
|
||||||
$oLocation->setCountryLanguage();
|
// moved to oxcmp_lang extension because here it's to late
|
||||||
|
// $oLocation->setCountryLanguage();
|
||||||
|
|
||||||
if (!isset($oBasket)) {
|
if (!isset($oBasket)) {
|
||||||
$oBasket = $this->getSession()->getBasket();
|
$oBasket = $this->getSession()->getBasket();
|
||||||
|
@ -20,6 +20,7 @@ $aModule = array(
|
|||||||
'email' => 'support@shopmodule.com',
|
'email' => 'support@shopmodule.com',
|
||||||
'url' => 'http://www.oxidmodule.com/',
|
'url' => 'http://www.oxidmodule.com/',
|
||||||
'extend' => array(
|
'extend' => array(
|
||||||
|
'oxcmp_lang' => 'd3/d3geoip/modules/components/d3_oxcmp_lang_geoip',
|
||||||
'oxshopcontrol' => 'd3/d3geoip/modules/controllers/d3_oxshopcontrol_geoip',
|
'oxshopcontrol' => 'd3/d3geoip/modules/controllers/d3_oxshopcontrol_geoip',
|
||||||
),
|
),
|
||||||
'files' => array(
|
'files' => array(
|
||||||
|
@ -250,6 +250,7 @@ class d3GeoIP extends oxBase
|
|||||||
|
|
||||||
if (!$this->isAdmin()
|
if (!$this->isAdmin()
|
||||||
&& oxRegistry::getUtils()->isSearchEngine() === false
|
&& oxRegistry::getUtils()->isSearchEngine() === false
|
||||||
|
&& oxRegistry::getSession()->getId()
|
||||||
&& oxRegistry::getSession()->getVariable('d3isSetLang') === null
|
&& oxRegistry::getSession()->getVariable('d3isSetLang') === null
|
||||||
&& $oCountry->getId() && $oCountry->getFieldData('d3geoiplang') > -1
|
&& $oCountry->getId() && $oCountry->getFieldData('d3geoiplang') > -1
|
||||||
) {
|
) {
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user