Skip to main content

Magento Multiple Store Setup

Many times we need to create multiple stores in magento website. In magento we create different stores to make it more local. We can access different stores using below ways:

1) Domain (e.g. www.store1.com and www.store2.com)
2) Subdomain (e.g. store1.mystore.com and store2.mystore.com)
3) Folder (e.g. mystore.com/store1/ and mystore.com/store2/)

Its all upto to you which way you prefer. For all these we need to follow below steps:

Step 1: Add new Magento store: It might be possible that both store have different 

catalogue so to manage this. We need to make two different Base Categories. To create a new base category follow below steps:

  • Log in to your Magento admin panel.
  • Go to Catalog -> Manage Categories.

  • If you want both your websites to share same “Default Category”, select it by clicking on it on the left. Or click Add Root Category to create a new root category different from the existing one.
  • Once the category is selected, under the General Information set Is Active to Yes
and under the Display Settings tab in the dropdown set Is Anchor to Yes.

  •  Click Save Category.
Step 2: Create Stores : Now we have creating store categories now we need to assign these categories to different stores as per our requirement. For example: All English store categories are assigned to English store and same with other store.

  • Go to System -> Manage Stores




  • Click the Create Website button

 
  where you need to enter:
  • Name – domain name of the new website
  • Code – a parameter that will be used in configuring the Apache web server to point to that particular domain name (without spaces) 
  • Click Save Website.  
  • Go to System -> Manage Stores and click the Create Store View button.
  • In the Store drop-down select the store to which this view will be associated with.
  • In the Name field enter a name of this store view (i.e. English Version).
  • In the Code field enter a unique code for this store view.
  • Select the Status – if enabled, this store view will be accessible from our frontend, otherwise, it will not be accessible
  • Click Save Store View.

    Step 3: Store Configuration in the Server

    • We are going to see a second website at www.your_domain.com/magento/magento2. We are going to access the magento directory on our server and create a sub-directory folder magento2.
    • Copy the index.php file as well as the htaccess file from the magento folder over to the magento2 folder. In case you are using a different domain – copy these files to the root folder or your other domain).
    • Open your index.php file and look for the following line
      "$mageFilename = ‘app/Mage.php';"
    • Change it to
      $mageFilename = ‘../app/Mage.php';
    • Save the changes
    • Open up the copied htaccess file.
    • Add the following to the end of it
      SetEnvIf Host .*base.* MAGE_RUN_CODE="base";
      SetEnvIf Host .*magento_site_2.* MAGE_RUN_TYPE="magento2"; where magento2 is the website code taken from Step2 point 2 of this tutorial.
    • Save the changes.
    • In your Magento admin go to System -> Configuration -> General.

     

    • Under the Url options set Auto-Redirect to base URl to No
    • Click Save Config
    • Change the Default Config to the to newly created website’s view in the configuration scope and click Web
    • Under the Web click both the Unsecure and Secure tabs. You need to modify the Unsecure Base URL and Secure Base URLs with the corresponding domain name by unchecking the ”Use default [STORE VIEW]” checkbox and then save the configuration. In our case we are changing them this way (installed locally):
    • Click Save Config
    • Go to your second domain to check it out.


Comments

  1. Due to the rapid increase in eCommerce marketing, the overall economy has increased over the past time. Along with this crucial time, online growth for Magento eCommerce development became more important. In short, Adobe sensei revealed new product recommendations for Artificial intelligence (AI) as well as machine level language to customers, including businesses.

    ReplyDelete
  2. Thank you, I appreciate that I getting a lot of good and reliable information from your post. Thanks for sharing such kind of nice and wonderful post.

    Php Web Development Company Bangalore | Magento Website Service Provider In India | Internet Marketing Company in Bangalore | Magento Developers In Bangalore

    ReplyDelete
  3. Get your free games in demo mode for 'Dogs of Rage 2'
    It's still a free demo version to play for free here at StillCasino, and for the $999 it 11bet costs 카지노사이트 is probably a game starvegad of the same quality and can only be played on Steam

    ReplyDelete

Post a Comment

Popular posts from this blog

Add Products to cart Programmatically in Magento

Sometimes we need to add products into cart programmatically in controller. Below is the code which you can use to add product to cart.   1) For Simple Products If you are working in magento controller and wants to add a simple product programmatically then here is the code: Suppose our product id value stored in $productId.         // Below code will create instance of cart         $cart = Mage::getModel('checkout/cart');         // This will initialize cart         $cart->init();         // Get the product collection by passing product id         $productCollection = Mage::getModel('catalog/product')->load($productId); This product collection will be required as we have to pass it at the time of adding product to cart. For adding the product we have to call addProduct() function. In this function we have to pass two parameters first is productcollection and second is an array. This array contains product id and quantity which we are going

Quick Order Placement Form

If we want to place fast and quick order. We want to list all the product along with their categories  and price. For achieving this goal we have to follow these steps: 1) Create Template File : Create a template  file at /app/design/frontend/default/blanco/template/catalog/product/list_fast_order.phtml which will the list of all products along with their categories and Price listing. 2) Edit Layout : Before this we have to add the phtml file in catalog.xml file. 3) Get Result :  In list_fast_order.phtml file we have to show the product category wise /*assume we want to get all products of category id 5 */ $catid_1 = 5; /*we are loading all the products from category id 5 */ $_category = Mage::getModel('catalog/category')->load($catid_1); $subs = $_category->getAllChildren(true); /* Use for loop for making result array */ $result = array(); foreach($subs as $cat_id) { $category = new Mage_Catalog_Model_Category();