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

Creating a multisite setup
 
Magnus Wester
Member
 
Avatar
Total Posts:  42
Joined:  2007-09-02
Stockholm, Sweden
 

I have defined a secondary website with a web store, but I don’t know how to activate it.

The secondary website has its own domain name, that I’ve parked on top of the Magento domain. Is this correct?

Does the second shop have the same path as the main store, or what path does it get?

Speaking of paths, in Admin > Configuration > Web there are lots of codes like “cms”, “{{base_path}}”, “{{host}}” and “{{port}}”, can anyone explain them?

Also, each website and store has its own code - when is it used?

For me, hosting multiple sites and stores off the same code base is one of the most powerful aspects of Magento. Thanks for any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Hi, please check this url:
http://www.magentocommerce.com/wiki/Multiple-website-setup/

Should give basic idea, will be extended later

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Website codes right now used only as a root node name for website xml configuration

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magnus Wester
Member
 
Avatar
Total Posts:  42
Joined:  2007-09-02
Stockholm, Sweden
 

Thank you, I’ve made it select the correct store.

I seem to be missing configuration info for the site:

exception ‘Zend_Cache_Exception’ with message ‘Invalid id or tag : must use only [a-zA-Z0-9_]’ in /home/wabnet/public_html/magento/lib/Zend/Cache.php:101
Stack trace:
#0 /home/wabnet/public_html/magento/lib/Zend/Cache/Core.php(409): Zend_Cache::throwException(’Invalid id or t...’)
#1 /home/wabnet/public_html/magento/lib/Zend/Cache/Core.php(306): Zend_Cache_Core::_validateIdOrTag(’mbfa-en_default...’)
#2 /home/wabnet/public_html/magento/lib/Varien/Simplexml/Config.php(224): Zend_Cache_Core->save(’bd6c490746f44f5...’, ‘mbfa-en_default...’, Array)
#3 /home/wabnet/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(169): Varien_Simplexml_Config->saveCache()
#4 /home/wabnet/public_html/magento/app/code/core/Mage/Cms/controllers/PageController.php(39): Mage_Core_Controller_Varien_Action->loadLayout()
#5 /home/wabnet/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(225): Mage_Cms_PageController->viewAction()
#6 /home/wabnet/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(138): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#7 /home/wabnet/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(139): Mage_Core_Controller_Varien_Router_Standard->match(Object(Zend_Controller_Request_Http))
#8 /home/wabnet/public_html/magento/app/Mage.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/wabnet/public_html/magento/index.php(39): Mage::run(’mbfa-en’)
#10 {main}

It seems it is using the store code as a prefix for configuration files. Can you give me a list of the other files I need to clone off the demo to define the second site?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magnus Wester
Member
 
Avatar
Total Posts:  42
Joined:  2007-09-02
Stockholm, Sweden
 

Oh sorry, that was just because I used the code “mbfa-en”. I’ve changed it to “mbfaen” without the hyphen and it seems to work fine now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magnus Wester
Member
 
Avatar
Total Posts:  42
Joined:  2007-09-02
Stockholm, Sweden
 

If your second site is parked on top of the first, you must set Admin > System > Configuration > Web > Unsecure > Host to the domain name you are using for the second site, e.g. “microsoft.com”. For some reason, the built-in variable “{{host}}” doesn’t reflect the actual $_SERVER["HTTP_HOST"].

You should do this also for Secure > Host, since this link is sometimes used when linking to My Account.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Capitaine Commerce
Member
 
Avatar
Total Posts:  68
Joined:  2007-09-01
Lille, France
 
Magnus Wester - 04 September 2007 08:26 AM

Speaking of paths, in Admin > Configuration > Web there are lots of codes like “cms”, “{{base_path}}”, “{{host}}” and “{{port}}”, can anyone explain them?
.

I’d also really like to know…

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