tags:

views:

106

answers:

1

Can one host multiple store on Magento Community Edition? And how to automatically create a subdomain for each new store when it's set up?

+2  A: 

Yes, you can run multiple sites from Magento community edition. The Official Magento blog actually just had a post about this that you may want to check out: http://www.magentocommerce.com/blog/comments/from-the-support-team-multi-site-domain-name-setup/

The gist is that you need to create a new store in the Admin backend. If you are not using the same product catalog for both sites, you will also need to create another "root category" in your catalog category setup, and specify that category as the proper root for your second store.

Finally, the subdomain problem. Depending on what kind of server setup you are running, this could be the tricky part. If you have full control of the server (best idea, since running Magento on shared hosts is a bit problematic from a resource point of view), add vhosts to apache and set the environment MAGE_RUN_CODE and MAGE_RUN_TYPE variables in .htaccess for your site.

I don't see any easy way to set up the subdomain when you create the site, though. You would need to write apache to create hosts and modify .htaccess, which would take some nontrivial development to get done from the Magento site.

Much more detailed answer on the other end of that link. Hope that helps.

Thanks, Joe

Joseph Mastey
Thanks Joseph! May I ask if I want vendors/owners of stores NOT to be able to see other owners' data and categories. Can this be done in Community Edition too? Thanks in advance!
Viet
The multi-store functionality isn't really meant to accomodate multiple owners of stores. It may be possible to do by creating limited roles for those users with custom "Role Scopes" but I have never tested the extent of this separation so I cannot say categorically that you wouldn't have some bleed-over (or what it would be).
Joseph Mastey
it is currently not possible to have multi owner by letting someone only access data from his own store. It is a desired feature that currently requires a fair amount of development in the admin module to do the filtering. Best you can do is to have separate magento installation directories (duplicating all, inclusing the db) to allow for totally separate owner info :/
Zeograd