How to setup/configure multiple stores in Magento?

I have a Magento store http://handicrafts.com.pk and using the same installation of Magento I wanted to add another store(http://gemstones.com.pk ) to it.

I have a godaddy hosting so what i did, i added gemtones.com.pk on the top of handicrafts domain, you can say a kind of a addon domain as gemstones.com.pk was also pointing to the same folder containing handicrafts files that is

/webmaestros/handicrafts

By now i had both folders pointing to the same folder containing Magento files.

By going to Magento Admin > Catalog > Manage Categories, i renamed the Default Category to handicrafts.com.pk and added another root category gemstones.com.pk

Now by going to System > Manage Stores

Edited the default Website name to Handicrafts, Code for default website is base. Then edited the Default Store and changed the name to Handicrafts and changed the Root Category from the dropdown menu to handicrafts.com.pk. And finally edited the Default store view and changed its name to Handicrafts Store View, for the code i added handicrafts_en and set the status to Enabled.

Now was turn to add website, store and store view for the second domain gemstones.com.pk

Simply clicked  Add website and added name ‘gemstones’ and for the code gemstones as well.  Then clicked the Add store button and added name ‘gemstones’ and for the Root Category selected ‘gemstones.com.pk’ from the drop down menu.’ Lastly added the Store View and added the name ‘gemstones store view’, for the code added ‘gemstones_en’ and changed status to Enabled from the drop down and then clicked Save Store View

Then by going to System > Configuration,>Current Configuration Scope (located on the top left), change the dropdown menu from Default Config to handicrafts store view


Selected Web from the sidebar on the left under the General heading and for  both the Unsecure and Secure sections, unchecked the Use default box next to the Base URL item, and entered the URL  http://www.handicrafts.com.pk/


Then edited  System -> Configuration -> Gemstones Store View -> Web tab and :
set {Base URL}        to your http://www.handicrafts.com.pk/
set {Base Link URL} to your http://www.gemstones.com.pk/

Last step was to edit the index.php file

Replaced

Mage::run();  with this code in index.php

switch($_SERVER['HTTP_HOST']) {
case ‘gemstones.com.pk’:
case ‘www.gemstones.com.pk’:
Mage::run(’gemstones’, ‘website’);
break;
default:
Mage::run();
break;
}

Thats it!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值