How to add a new store in the same Magento code base

Assume we own, we want to add a new store as a subdirectory like this
First of all, login to the Magento admin panel.

1. Create root cateogory for the new store.
a)Go to Catalog from the top menu
b)Choose Manage Categories
c)Click Add Root Category
d)Enter for Name, select yes for both Is Active and Is Anchor
e)Click Save Category

2. Create new website
a)Go to System from the top menu
b)Choose Manage Stores
c)Click Create Website
d)For Name, enter, for Code, enter dvds
e)Click Save Website

3. Create new store
a)Click Create Store
b)For Website, choose from the dropdown
c)For Name, enter DVD Store
d)For Root Category, choose from the dropdown
e)Click Save Store

4. Create new store View
a)Create Store View
b)For Store, choose DVD Store under the in the dropdown
c)For Name, enter English
d)For Code, enter dvds_en
e)For Status, choose Enabled from the dropdown
f)Click Save Store View

5. System Configuration for the links
a)Go to System
b)Choose Configuration
c)For Current Configuration Scope(located on the top left), change the dropdown menu from Default Config to
d)Click Web from the side menu on the left
e)For both the Unsecure and Secure sections, uncheck the Use default box next to the Base URL, and enter the url for our store, Remember to put the trailing slash!
f)Click Save Config

After we done the above, we need to make some changes in the Magento code base.

1. Create the below directory in the Magento home directory.

2. Copy and paste the .htaccess and the index.php files from Magento home directory to the directory we just created.

3. Open up the index.php files in the dvds directory, look for

Mage::run($mageRunCode, $mageRunType);

add below right before the above line

$mageRunCode = 'dvds';
$mageRunType = 'website';

If there are issues to find the config.php and Magen.php files when loading, the look for the below lines in the index.php file

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';

Assume Magento is installed on the root directory of the server, replace them with the following respectively:

$compilerConfig = "/includes/config.php";
$mageFilename = "/magento_cm/app/Mage.php";

Search within Codexpedia

Custom Search

Search the entire web

Custom Search