Magento Forum

   
Finally achieved - How to make 1 website & 2 stores with 2 domains
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

I’m posting this in the forum in case someone with more experience sees something wrong with this configuarion. Please speak up if you do. All I know is it works for me.

I was trying to achieve 1 website, 2 stores with 2 domain names and this is how I’ve done it:

First I delegated my 2 domain names to the same namservers -

Go to Catalog > Manage Categories
- I created 2 root categories as anchors (one for each store)

Go to System > Manage Stores
- I left the website name as is (mine was Main Website)

Create your first store - I can’t remember what the default is but you may already have a ‘first store’. if so, just follow the configuration settings.

If not -
Click on ‘Create store’
Website: (greyed out and should read the Website Name)
Name: Type in the name of your store
Root Category: Chose the relevant root category that you created
Default Store View: This one

Create Store View
Store: This one
Name: Type in the name of your store
Code: I called mine wheels but make it whatever nickname you want
Status: Enabled
Sort Order: 0
----

2nd Store set up
- Create a new store

Name: Type in the name of your store
Root Category: Chose the relevant root category that you created
Default Store View: This one

Create Store View
Store: This one
Name: Type in the name of your store
Code: I called this one military but make it whatever nickname you want
Status: Enabled
Sort Order: 0

--------------------

Make sure your index.php file references the code of the default store (in my case ‘wheels’) so it reads:
Mage::run(’wheels’);

-------------------

Go to System > Configuration

Choose your first store in the dropdown on the left
Choose ‘Web’ from the menu on the left

For both ‘base URL’ AND ‘Base Link URL’ I put in:
http://www.myFIRSTstore.com/

SAVE this

Now choose the other site in the drop down and go to WEB

For both ‘base URL’ AND ‘Base Link URL’ I put in:
http://www.mySECONDstore.com/

If you do the above and your second store has no design it’s because you’re linking to a design that doesn’t exist yet (that’s a whole other post).
If you want your stores to have the same designs, you would put your first store URL in Base link URL for both stores.

I hope this helps people and please point out anything that isn’t clear or correct and I will come back and fix it up.

My 2 stores (in the making) can be seen at:
wheelsautomotivebooks.com.au
battlebridgemilitarybooks.com.au

 
Magento Community Magento Community
Magento Community
Magento Community
 
magpieradio
Jr. Member
 
Total Posts:  30
Joined:  2008-04-27
 

My name server is 1&1;so my two domains point to a similar IP number.

What goes in the root of the second domain? 

.htaccess and index.php ? 

I tried editing the index file to point to

http://www.firstdomain.com but it brings up “ pp/Mage.php not found “

Need that last bit of help please. 

How does the second domain see magento?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

To be honest, it was much easier than that. All I did was point the names to the same nameserver and put in the URL info in the config area as mentioned above. Sorry, that’s all I know. And I edited the index.php file on the server.

Did you do what I said above, and it’s not working?

 
Magento Community Magento Community
Magento Community
Magento Community
 
magpieradio
Jr. Member
 
Total Posts:  30
Joined:  2008-04-27
 

Not sure what you mean.

Sorry to be so dense but 1&1;name servers only allow
me to put an IP address to my server.

Can you take a screen shot and show me what you did?

WHen you say “point to the config” please expand in
detail what this means.

I really want to nail this soon!

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magpieradio
Jr. Member
 
Total Posts:  30
Joined:  2008-04-27
 

Do everything as above.

In my plesk I deleted the 2nd domain (remove physical hosting)

In the 1st domain I added a domain alias (create, domain2.com )

In the 1st domain change the index.php last lines…

require_once $mageFilename;

umask(0);

if ($_SERVER[’SERVER_NAME’] == ‘www.domain1.com’) Mage::run(’domain1_eng’);

if ($_SERVER[’SERVER_NAME’] == ‘www.domain2.com’) Mage::run(’domain2_eng’);

note that run name = the code name you setup via magento config

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dustin
Sr. Member
 
Total Posts:  160
Joined:  2008-03-13
Columbus, OH
 
lindaw - 14 April 2008 07:10 PM

I’m posting this in the forum in case someone with more experience sees something wrong with this configuarion. Please speak up if you do. All I know is it works for me.

I was trying to achieve 1 website, 2 stores with 2 domain names and this is how I’ve done it:

First I delegated my 2 domain names to the same namservers -

Go to Catalog > Manage Categories
- I created 2 root categories as anchors (one for each store)

Go to System > Manage Stores
- I left the website name as is (mine was Main Website)

Create your first store - I can’t remember what the default is but you may already have a ‘first store’. if so, just follow the configuration settings.

If not -
Click on ‘Create store’
Website: (greyed out and should read the Website Name)
Name: Type in the name of your store
Root Category: Chose the relevant root category that you created
Default Store View: This one

Create Store View
Store: This one
Name: Type in the name of your store
Code: I called mine wheels but make it whatever nickname you want
Status: Enabled
Sort Order: 0
----

2nd Store set up
- Create a new store

Name: Type in the name of your store
Root Category: Chose the relevant root category that you created
Default Store View: This one

Create Store View
Store: This one
Name: Type in the name of your store
Code: I called this one military but make it whatever nickname you want
Status: Enabled
Sort Order: 0

--------------------

Make sure your index.php file references the code of the default store (in my case ‘wheels’) so it reads:
Mage::run(’wheels’);

-------------------

Go to System > Configuration

Choose your first store in the dropdown on the left
Choose ‘Web’ from the menu on the left

For both ‘base URL’ AND ‘Base Link URL’ I put in:
http://www.myFIRSTstore.com/

SAVE this

Now choose the other site in the drop down and go to WEB

For both ‘base URL’ AND ‘Base Link URL’ I put in:
http://www.mySECONDstore.com/

If you do the above and your second store has no design it’s because you’re linking to a design that doesn’t exist yet (that’s a whole other post).
If you want your stores to have the same designs, you would put your first store URL in Base link URL for both stores.

I hope this helps people and please point out anything that isn’t clear or correct and I will come back and fix it up.

My 2 stores (in the making) can be seen at:
wheelsautomotivebooks.com.au
battlebridgemilitarybooks.com.au

How did you get the design/styles, product images and all that working with this setup?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

Creating a new design for your second store.

In Admin -

Under Manage Stores, in Store View of your 2nd store take note of what you’ve used as the ‘code’. In my case the code was ‘military’

Now, using FTP -

To create new styles for your new store go to:

/public_html/skin/frontend/default/default/

Copy all the files in here onto your computer

Back to FTP

Create a new directory/folder in the same one that the second ‘default’ folder is in and call it the name of your Store View ‘code’ (mine is military). I now have a default directory and a military directory

Now upload the files you copied from the default directory into your new directory.

You now have a new css and images directory for your second store. Edit these and your 2nd store should use them.

--------------

For the layout etc do the same as above but follow this path:

/public_html/app/design/frontend/default/

BUT only copy the files/folders you intend to change. Magento falls back on the default folder for anything that isn’t in your new folder.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dustin
Sr. Member
 
Total Posts:  160
Joined:  2008-03-13
Columbus, OH
 

/* Never Mind Figured It Out */

How did you get the drop down for stores in your header?

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