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

Page 1 of 2
Configure Multiple Websites
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 

I need some help. I’m trying to understand exactly how to setup and configure multiple websites each with a single store. I’ve setup everything in the configuration and everything seems to be there as expected but I can’t seem to get the different URLs to work so that they take the visitor to the proper store. I have spent hours searching the Magento site but can’t find the answers I’m looking for.
Before I go any further, let me describe my internet configuration.
I have 4 domains names: Dom1, Dom2, Dom3, & Dom4
I have a web host with Dom1 pointed to the root directory, (works fine)
I have created sub-directories for the remaining three domain names and created subdomains for each of those directories.
So my DNS looks like this:
Dom1 -> root dir
Dom2 -> subdir1
Dom3 -> subdir2
Dom4 -> subdir3

I want to create websites/stores for Dom2, Dom3, & Dom4. I have installed Magento in subdir1 and set up my store for Dom2 without any problems. In the System/Configuration/Web I set the unsecure base URL for Mage Website#1 (Dom2) to Dom1/subdir1/ and left everything else set to use the default. The first store is working fine and you can view it at: http://mymomsattic.biz/. (Dom2)
I have three default Interface packages created for each of the website/stores defined in the configuration.

The question I have is how do I configure the other two websites so that when a user enters either Dom3.com or Dom4.com into their browser they will be directed to the right magento store with the right products and theme?

Any help I can get on this will be greatly appreciated. Once I get this working I promise to create a wiki article on how to do it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 

I am relying to my own post to let anyone else reading this know that I found the answers (at least some of them) that I was looking for. The process for setting up additional websites is explained in the following videos posted on the Magento site:

http://www.magentocommerce.com/blog/comments/video-creating-multiple-online-storefronts-part1/
http://www.magentocommerce.com/blog/comments/video-creating-multiple-online-storefronts-part-2/

Note: These videos were carried out and recorded on the 0.9.17740 version of Magento:
I followed the steps successfully using version 1.1.6.
Also, when you copy the index.php file to the second website directory and then edit it, it is important to put the CODE that you used when you setup your additional websites in the Magento admin: Mage::run(’put_code_here’, ‘website’);

Once I get my websites up and running I plan on creating a wiki article explaining exactly how this worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bins
Jr. Member
 
Total Posts:  26
Joined:  2008-03-26
 

James,

apologies I didnt see your post earlier, as I have just recently set up a multistore and may have been able to help.  HoweverI still cant get it 100% right (all seems ok, but I need different base currencies in each site).

Have a look here - a recent Magento webinar on multisite (and mine was the first question at the end!):
http://video.google.com/videoplay?docid=-2478341786696713471&hl;=en

One question for you, when you say:
“Also, when you copy the index.php file to the second website directory and then edit it, it is important to put the CODE that you used when you setup your additional websites in the Magento admin: Mage::run(’put_code_here’, ‘website’);”

What do mean by: ’put_code_here’?  What code?  I dont have anything else, only the store and it seems to work except the muticurrency.  Alas, the forums do not appear to be the geates for help (well for me, anyway!) .

Paul

 
Magento Community Magento Community
Magento Community
Magento Community
 
kullysupply
Member
 
Avatar
Total Posts:  48
Joined:  2008-08-05
 

Paul - In the admin > system > manage stores, each website has a unique code. Replace “put_code_here” with that code.

James - I have set up multiple websites as well. My issue, however, is that as far as I can tell you can only apply one SSL Certificate per hosting account (domain specific), so any additional stores can’t have a secure checkout. Are you having this problem?

-Greg

 
Magento Community Magento Community
Magento Community
Magento Community
 
bins
Jr. Member
 
Total Posts:  26
Joined:  2008-03-26
 

Greg,

Just to clarify, the code is - admin > system > manage stores> select ‘website’ , then code is shown.

At the moment I only have the ‘store view name’ in the brackets, which gives me the multi store functionality, but not unique default currencies. 

When I change it to (’store view name code’,’website name’) I get a 404 error (firefox: Redirection limit for this URL exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.)!

Now, my default currency issue may not be becuase of this Mage:: setup, however, I worry, because it doeas not act as everyone says it should!

 
Magento Community Magento Community
Magento Community
Magento Community
 
technologycarbon
Jr. Member
 
Total Posts:  1
Joined:  2008-09-23
 

Friends,

I’m trying to take advantage of this feature in Magento as well. It seems like no one has done it successfully, I hope you guys can figure it out. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
xactrecords
Sr. Member
 
Total Posts:  80
Joined:  2008-09-14
 

my problem is that when I try to call the mage.php file it says it can’t be found yet its the exact url to the file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xactrecords
Sr. Member
 
Total Posts:  80
Joined:  2008-09-14
 

also I am using multiple domain names if that helps.  Really not sure what im doing wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 
kullysupply - 14 October 2008 07:54 AM

Paul - In the admin > system > manage stores, each website has a unique code. Replace “put_code_here” with that code.

James - I have set up multiple websites as well. My issue, however, is that as far as I can tell you can only apply one SSL Certificate per hosting account (domain specific), so any additional stores can’t have a secure checkout. Are you having this problem?

-Greg

Greg, I’m not using SSL so I don’t think I can help you with this issue. I do have 3 different websites now working from Magento. http://mymomsattic.biz, http://semiretiredtreasures.com, and http://dianesbeanies.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

Hello,

The information is this post may be helpful to you.

http://www.magentocommerce.com/blog/comments/how-to-setup-multiple-magento-stores/

It’s a short how-to on setting up multiple stores and the environment requirements, etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chezokid
Jr. Member
 
Total Posts:  1
Joined:  2008-12-26
 

Hi all I have managed to get more than one site running without any issues but it did take me a while to work it out.

What I did was in the index.php file on the new site is update the $mage to the path of the mage.php (eg: /home/public_html/app/mage.php)

Then i updated the mage::run command (eg: mage::run(’store view code’,’website’))

Then in the configuration screen you need to update the link URL for the site.

If you have issues with it let me know and we can arrange for me to take a look and help you get it working.

Hope this Helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
smlaci
Sr. Member
 
Avatar
Total Posts:  122
Joined:  2008-04-15
Bacau
 

hello,

i have a 2 websites configuration too but my problem is that after creating and setting up the second one i cannot upload product images anymore. clicking the browse files button does nothing. have tried it on 3 different computers, on Ie7 and Firefox 3 and nothing.
can anyone help?
thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Marksson
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-03-24
 

Hey all,

I recognize some of the issues you’re having. I’ve managed to get my second store up and running with the help of this thread . (specifically the post of WholsGregg who also has a Dedicated server running Plesk)

My problem now is that I’m not sure how to set up the correct Base URL and Base Link URL for the second store. In most of the examples, a situation is created where the second shop is redirected to a folder in the first. But what I get then, is that all products are linked to the URL of the other shop.

Let me use the setup of jballotti (hope you don’t mind) to explain what I mean:

These are your three webshops urls:

1. http://mymomsattic.biz
2. http://semiretiredtreasures.com
3. http://dianesbeanies.com

But if you click on a product on these sites, you are redirected to these links (for the example, I’ll use product1.html, product2.html and product3.html)

1. http://dianeballotti.com/Attic/product1.html
2. http://dianeballotti.com/Semiretired/product2.html
3. http://dianeballotti.com/Beanies/product3.html

What I would want in your case, is to have it like this:

1. http://mymomsattic.biz/product1.html
2. http://semiretiredtreasures.com/product2.html
3. http://dianesbeanies.com/product3.html

I’ve succeeded in doing this, but I’m not sure if it is the correct way to go.

Here’s what I have now:

- I’m running my first store on http://www.merkkleding-usa.nl
- I’ve duplicated this store and now have a second store on http://www.markenkleidung.de

These are my settings in the configuration > web section (for the second store)

Base URL http://www.markenkleidung-usa.de/
Base Link URL {{unsecure_base_url}}
Base Skin URL http://www.merkkleding-usa.nl/skin/
Base Media URL {{unsecure_base_url}}media/
Base JavaScript URL {{unsecure_base_url}}js/

Ok, now this works almost correctly. I use a seperate theme to display another logo in the second store and the rest from the theme is pulled from the default. But my product images are not showing now. I could change the Base Media URL to link it to the first store (like I did with the Skin URL), but that doesn’t work either.

To be honest, I have a feeling I’m not doing things the way I’m supposed to!

Can anyone shed a light on this? Has anyone succeeded in setting up multiple sites with unique URLs the way I would like it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
smlaci
Sr. Member
 
Avatar
Total Posts:  122
Joined:  2008-04-15
Bacau
 

I have resolved the issue with the browse button, it was Flash 10 that’s not compatible with Magento 1.1.6.
Everything now is perfect.

@Mgjaltema:

Don’t mess with the Base URL, skin, media and java.
Only change Base Link URL to your domainname.
Now, copy .htaccess and index.php from your Magento instalation to the root of the second website ( http://www.markenkleidung.de ).
Edit these 2 things in index.php:

$mageFilename = ‘/home/whaterver user/public_html/magento instalation folder/app/Mage.php’;

and of course:

Mage::run(’your website code’,’website’);

Impossible not to work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Marksson
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-03-24
 

Thanks for your answer, smlaci

I changed the URLs back to what you said. Only the Base Link URL is now changed and it (stil) works.

As for the other tips: I already had and index.php pointing to the right folder, so that wasn’t not the problem grin

The problem is that my product images are not showing in my second shop…

These are the same products in the two shops:

- http://www.merkkleding-usa.nl/herenkleding/jassen/jas-beige-ralph-lauren.html
- http://www.markenkleidung-usa.de/herrenkleidung/jas-beige-ralph-lauren.html

Only one of the links shows the product image.

Anyone out there with the same problem? Or am I overlooking something simple, maybe..

 
Magento Community Magento Community
Magento Community
Magento Community
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 

Very Good! you have discovered the secret of my site. Actually, my client (my 75 year old mother) signed up for a web site with Go Daddy (against my recommendation). Her initial website was and is http://dianeballotti.com. In addition to this site she also purchased the domain names noted. Those domain names have been pointed to subdirectories of her primary site. The Magento software is installed in dianeballotti.com/Attic/ the other stores are setup to refer to this directory. The pointing to these subdirectories is a function of the DNS configuration and not the Magento configuration. Everything works just fine for anyone using any of the URL’s. As I understand how the Magento software works, you can redirect any URL to the base Magento installation, including stores on entirely different servers. However, this is not something I’m even considering trying because of performance questions.

Besides the live sites I’ve created for my mom, I also have an extensive test site set up on my local computer using XAMPP. If you’d like to see how I did this visit: http://ecommerce.ipicdg.com. There you will find videos that will demonstrate exactly how I set it up.

[[[Let me use the setup of jballotti (hope you don’t mind) to explain what I mean:

These are your three webshops urls:

1. http://mymomsattic.biz
2. http://semiretiredtreasures.com
3. http://dianesbeanies.com

But if you click on a product on these sites, you are redirected to these links (for the example, I’ll use product1.html, product2.html and product3.html)

1. http://dianeballotti.com/Attic/product1.html
2. http://dianeballotti.com/Semiretired/product2.html
3. http://dianeballotti.com/Beanies/product3.html

What I would want in your case, is to have it like this:

1. http://mymomsattic.biz/product1.html
2. http://semiretiredtreasures.com/product2.html
3. http://dianesbeanies.com/product3.html ]]]

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2