View Issue Details

IDProjectCategoryView StatusLast Update
0001210OXID eShop (all versions)1. ----- eShop frontend -----public2012-12-10 14:17
Reporterandreas_ziethen Assigned To 
PriorityurgentSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Summary0001210: language dependent domains do not work in subshops
DescriptionIf you have a master shop and several subshops and you define special domains for the different languages - e. g.: www.shop.de for german, www.shop.com for english and so on .. - these language-domains do all show the master-shop and not the according subshop.
Additional InformationThe problem is located in oxconfig::getShopId(). Before this block:
--------------------------------
if ( !$this->_iShopId && !$this->isAdmin() ) {
                //determinig by host
                $sQ = 'select DECODE( oxvarvalue, "'.$this->getConfigParam( 'sConfigKey' ).'") as oxvarvalue, oxshopid FROM oxconfig WHERE oxvarname = "sMallShopURL" ';
                $oRs = oxDb::getDb(true)->Execute( $sQ );
                if ( $oRs !== false && $oRs->recordCount() > 0) {
                    while ( !$oRs->EOF ) {
                        $sUrl = $oRs->fields['oxvarvalue'];
                        $sId = (int) $oRs->fields['oxshopid'];

                        if ( $sUrl && $this->isCurrentUrl( $sUrl ) ) {
                            $this->_iShopId = $sId;
                            break;
                        }
                        $oRs->moveNext();
                    }
                }
            }
------------------------------------

there should be this block:
-------------------------------------
if ( !$this->_iShopId && !$this->isAdmin() ) {
                //determinig by host
                $sQ = 'select DECODE( oxvarvalue, "'.$this->getConfigParam( 'sConfigKey' ).'") as oxvarvalue, oxshopid FROM oxconfig WHERE oxvarname = "aLanguageURLs" ';
                $oRs = oxDb::getDb(true)->Execute( $sQ );
                if ( $oRs !== false && $oRs->recordCount() > 0) {
                    while ( !$oRs->EOF ) {
                        
                        
                        $sLangUrls = $oRs->fields['oxvarvalue'];
                        $aLangUrls = unserialize($sLangUrls);
                        
                        $sId = (int) $oRs->fields['oxshopid'];

                        
                        foreach ($aLangUrls as $sUrl) {
                            if ( $sUrl && $this->isCurrentUrl( $sUrl ) ) {
                                $this->_iShopId = $sId;
                                break;
                            }
                        }
                        
                        
                        $oRs->moveNext();
                    }
                }
            }
--------------------------
Than everything works like it should.
TagsSubshops
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

dainius.bigelis

2009-08-25 15:41

reporter   ~0001516

Reminder sent to: andreas_ziethen

Hi,

Sorry, but I cannot reproduce this case. But I want to make sure that I understood the case correctly, so let's make it clear step by step:
1. I created two subshops.
2. then entered separate domains for those subshops (in Admin->Core Settings->Mall->Shop URL, when subshop is selected):
- http://subshop.com for one subshop
- http://subshop.de for second subshop
3. Then in the Main shop I inserted domains for separate languages (Master Settings->Languages->Base URL):
- http://subshop.de - for Deutsch
- http://subshop.com - for English
(setup is finished)
4. Then I go to frontend of Main shop, and click on the Deutsch language icon - and I'm directed to subshop http://subshop.de. All the links in this shop also shows the subshop domain (subshop.de).
The same, if I'm selecting English language icon from Main shop - I'm directed to subshop http://subshop.com.

P.s.:
if language domains are inserted for Languages also in the subshops - I can navigate between the subshops by clicking on the language icon.

Could you please write if you have configured something differently than written here? Maybe it depends on some other options.

dainius.bigelis

2009-08-27 08:34

reporter   ~0001533

Closed as cannot reproduce.

andreas_ziethen

2009-08-31 16:01

reporter   ~0001582

No, you got me wrong:
Everything's fine in the main shop - but NOT in the subshops.
Try setting different domains for different languages in a subshop and you will be able to reproduce.

dainius.bigelis

2009-09-25 16:34

reporter   ~0001834

Missunderstood the case initialy.
The problem occurs when, i.e.:
you have 1 subshop (default language is DE). Then for EN language in this subshop you defined separate domain, like "englishsubshop".
When user inserts domain "englishsubshop" in the browser - he should be directed to the same subshop, just with EN language selected.
But the bug is - that system directs user to Parent shop.

sarunas_valaskevicius

2009-09-28 13:20

reporter   ~0001838

fixed in oxConfig::getShopId