Michael K.
Michael K.

Reputation: 1

Magento multi store issues on subdomain

I have configured a Magento 1.9 multistore, main store on example.com and second store on site1.example.com

i have followed exactly this tutorial:

http://www.wptaskforce.com/setting-magento-site-multiple-stores-subdomains/

On the Magento backend everything is configured and the subdomain configured correctly as well.

Also the htaccess file has been configured as instructed by the tutorial.

However when i go to the store on the subdomain i see the same catalog content of the main store and not the one set for the store on the subdomain, i tried to change the background on the main store to see if the change happens also on the store on the subdomain but it doesn't.

What am i doing wrong ?

Upvotes: 0

Views: 3202

Answers (1)

Deepak Mankotia
Deepak Mankotia

Reputation: 4564

How to create multi stores in magento

  1. Login to your admin panel.
  2. Go to Catalog -> Manage Products https://www.dropbox.com/s/4uhuvaiuwure9wv/image1.png?dl=0

Window appears with categories section.

  1. In right sidebar select Add Root Category. https://www.dropbox.com/s/l1qlaquhpgctq46/image2.png?dl=0

  2. New window opens with empty fields, fill all required fields. a) In Name enter name of your store. b) Select Is Active to yes. c) Under Display Settings tab select yes for Is Anchor. d) Now click on save category to save settings.

https://www.dropbox.com/s/l6i4epy85ghnd7f/image3.png?dl=0

  1. After creating category Go to -> System ->Manage Store

https://www.dropbox.com/s/mw2javuurmosbig/image4.png?dl=0

  1. In new window search for Create Website button on top-right and click on it. https://www.dropbox.com/s/kvaqmsp2nncaunm/image5.png?dl=0

a) In name field enter name of your store. b) In Code field enter unique string without any white space(Unique Code will use later) c) Click on save Website in Right-Top.

  1. Now select Create Store from Right-top

https://www.dropbox.com/s/xm2z58wbyusv0k5/image6.png?dl=0

a) In Website select your website from dropdown. b) In Name enter name for your store. c) In Root category select category name whic is created in step 4(a).

https://www.dropbox.com/s/wla2v3yi8gsw8cl/image7.png?dl=0

d) Click on save store to save store.

  1. Click on Create store view.

https://www.dropbox.com/s/5fbbm5ibzuvqltz/image8.png?dl=0

a) Select you sore name in Store field. b) Give a view name in view field. c) In code enter unique string identifier to you store view. d) Change status to Enable.

https://www.dropbox.com/s/18a453tes3grvmr/image9.png?dl=0

e) click on Save store view to save store view.

9 : Now go to System > configuration > Current Configuration Scope (Top left)

https://www.dropbox.com/s/cq68gzs673tn4ly/image11.png?dl=0

a) Select Web from the left sidebar Menu. b) Expand Secure and Unsecure Sections and enter Base URL for both. c) Click on save configuration.

  1. Open you Magento index.php (This is situated in root directory of magento) a) Now search

    /* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

and enter below code

if($_SERVER['HTTP_HOST'] == 'mystore.com')
        {
                             Mage::setIsDeveloperMode(true);
                 $mageRunCode = 'mystore1';
                 $mageRunType = 'website';
         }
    else if($_SERVER['HTTP_HOST'] == 'mystore1.com')
        {

                 $mageRunCode = 'mystore1';
                 $mageRunType = 'website';
        }
    else
        {
                 $mageRunCode = 'mystore2';
                 $mageRunType = 'website';

        }

In above code enter your store name instead of mystore.com, enter unique code whic is entered in 6(b) and use website to create website and store to create store.

https://www.dropbox.com/s/cq68gzs673tn4ly/image11.png?dl=0

Upvotes: 0

Related Questions