Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Multiple ‘websites’ - Single Domain
 
rowanparker
Jr. Member
 
Total Posts:  3
Joined:  2008-12-08
 

Hi guys,

What I’d like to do is have 2 ‘websites’ (in the Magento sense) running from the same domain/folder. The template would have links to switch between them.

Going off the information on this page:
http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/

I should add some code like below. The default store is AUD, the secondary is GBP.

if (isset($_REQUEST['some_unique_var_name'])
{
    $runStore 
$_REQUEST['some_unique_var_name'];
}
else if (isset($_SESSION['some_unique_var_name']))
{
    $runStore 
$_SESSION['some_unique_var_name'];
}
else
{
    $runStore 
'default';
}

switch($runStore)
{

    
case 'uk':
        
$_SESSION['some_unique_var_name''uk';
        
Mage::run('store_uk','website');
        break;

    default: 
// AU
        
$_SESSION['some_unique_var_name''default';
        
Mage::run();
        break;
}

So basically the two links on the page will switch the store and save that in the session info. This seems to be a really ugly hack - if it even works…

NB I’m doing this because it seems to be the only way to have fixed pricing for 2 different currencies (no automatic exchange rate adjustments). If this can be done much easier I’d prefer to do it that way smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
rowanparker
Jr. Member
 
Total Posts:  3
Joined:  2008-12-08
 

Any help? smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top