I have several windows in one shop. How can I make Magento use Base URL of Magento settings? Now it duplicates the same item for all windows even if the shop is attached to the catalogue’s root directory.
It means that one item exists on different domains but it placed in the same category of the catalogue
subdomain1/nokia1280
...
subdomain3/nokia1280
URL Rewrite Management does not help
I am not sure what the question is but if you want to use multible domains with products you should do the following:
Foreach subdomain
Redirect the subdomain to the magento shop ( vhost alias for example )
Change the .htaccess to set the environment based on Referer
Add a new Root category for this domain
Create a new Store with Storeview
Go to Sysem => Configuration => Web and select the storeview top left
Change the base URLS to the subdomain for this store.
Go to System => Configuration => Design and change the template / skin / layout for this store
Now will your subdomain be loaded within his own environment, with his own template and skin.
More information
Use websites
Notice that users will be shared along the different domains. If you
don`t want this you should go a level further and make more websites.
.htaccess set environment
SetEnvIf Host sub1.website.dev MAGE_RUN_CODE=subdomain1
SetEnvIf Host sub1.website.dev MAGE_RUN_TYPE=store
SetEnvIf Host sub2.website.dev MAGE_RUN_CODE=subdomain2
SetEnvIf Host sub2.website.dev MAGE_RUN_TYPE=store
Hope this will help !
Good luck.
Related
I need to create geo subdomain for one city (for example shop.com & london.shop.com). I want the same store. But also I want to have different pages like:
london.shop.com/contacts & shop.com/contacts.
I use magento 1.9.2.1
you need to create multiple websites and store for different domain.create one folder on root and put index.php and .htaccess file and change in index.php store name or website name at last.
Please refer below link
http://inchoo.net/magento/how-to-set-multiple-websites-with-multiple-store-views-in-magento/
I am using multi website magento store having 3 websites for books,electronics and apparels in subdirectories like www.example.com/books, www.example.com/apparels. Is it necessary to include all folders like app, downloader, skin, etc in root folder to subdirectories or any other option is there because it seems to consume more memory for each one.
I manage one Magento site with two stores (two totally different URLs) operating from one instance of Magento. Each URL points to a different base directory on the hosting site. One directory holds the entire Magento installation. The second directory uses a combination of symbolic links and actual files as follows.
Symbolic links: app, errors, includes, js, media, skin, var
Actual files: .htaccess, index.php
www-root/directory1/[all magento files]
www-root/directory2/[symbolic links and .htaccess and index.php files]
You then set the insecure and secure base URLs for each store. In this case there is a separate root category for each store. And many of the Magento configuration parameters may be set individually for each store or use the default value.
No, you don't have to.
You can create multiple stores from system -> Manage Stores -> Create Store, if you don't have them already.
You can manage the url of the stores from system -> configuration -> Web and set secure and unsecure base url for each store by selecting the configuration scope on the top left.
E.g.: You can select the scope to 'books' store and set base url to www.example.com/books and set the scope to 'apparels' store and set base url to www.example.com/apparels.
Edit:
You also have to copy the index.php to the subfolder and edit this file. E.g. for www.example.com/apparels, add:
$mageRunCode = 'apparels';
$mageRunType = 'website';
before the line:
Mage::run($mageRunCode, $mageRunType);
Also try to copy the .htaccess to the subdirectory.
No, you no need to copy all folder , you need to create folder for books & apparels then copy your index.php and .htaccess file from magento root folder to existing folder (both books & apparels) also you need to set base url in magento adminpanel > system > configuration > web for new stores
I am trying to set up 2 sites under 1 magento installation. I used the following guide and creating 2 root categories:
http://www.terranetwork.net/blog/2011/11/magento-multi-store-on-shared-cpanel-hosting-with-parked-domains/
The missing code from the .htaccess section of the guide is:
SetEnvIf Host .example. MAGE_RUN_CODE=example
SetEnvIf Host .example. MAGE_RUN_TYPE=website
It is working good however the shopping cart isn't shared between both sites. Does anyone know how I can achieve this?
How did you set your stores up in Magento? They have to be setup a particular way in order for them to work together.
I believe that the two stores have to be created to be apart of the same website in order to share the same cart.
I am trying to integrate multiple magento sites within the one installation. From what I have found i need to use a parked domain method however I have tried various methods to get it all working however I keep getting the 2nd store redirecting to the main store so I am looking for the best method to allow me to run multiple websites.
Any help is greatly appreciated
We currently have 4 stores all sharing one Magento installation & set of products. Each has it's own unique URL.
Create your Stores
Go to System -> Manage Stores
Click on Create Website. In the Name field, enter your store name. In the Code field, enter a unique code [lowercase & without spaces - we're going to give it a code of domain1 for our example] (to be used later) & Save.
Click on Create Store. In the Website field, select the website from step 2. In the Name field, enter a name. In the Root Category field, select the Root Category for your store & Save.
Click on Create Store View. Select the store you just created (from the dropdown menu) for Store. Type a name for your store in the Name field (Example from Magento is English Store). In the Code field, enter a unique string to identify the store view (just like for your store). Change the Status to Enabled & Save.
Repeat for all your stores
Configure your stores in the Magento Admin Configuration Section
Go to System -> Configuration
In the Store Scope (top-left dropdown), choose your first Store.
Choose Web from the Left-side menu
Open the Unsecure & Secure sections
Change the domains to what they would be (i.e. - http://www.domain1.com/) Don't forget the trailing slash at the end
Repeat for all stores
Server Config (for Magento versions 1.4.0.1 and greater)
Point your domain (e.g. - www.domain1.com) to your server where your single Magento instance is installed
Set up a Pointer/Parked domain on your server (see your Host's instructions or contact them)
In the .htaccess file on the root of your install, put in the following code for each of your stores
SetEnvIf Host .*domain1.com
MAGE_RUN_CODE=domain1 <- This was your important code from step 2 under Create your Stores SetEnvIf Host
.*domain1.com MAGE_RUN_TYPE=website
This set of 2 must be repeated for every domain you have.
For our particular stores/domains (might find useful)
Some servers, particularly those running Litespeed Web Server, the SetEnvIf directive does not get recognized in the .htaccess file. This was particularly true for us.
We had to do the following
Find RewriteBase / or RewriteBase /magento/ or etc
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_CODE:domain1]
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_TYPE:website]
We also have symlinks set up on our server (under each or our domains) to point to our main domain's folders (for the app, includes, js, lib, media, shell, skin, var)
Multi Store in Magento v1.6.2
in the VirtualHost configuration set the DocumentRoot to where you have your Magento installed (something like /var/www/magento), so it will be the same for every domain as we want only one Magento install for each domain
in Magento's admin, go to System -> Manage Stores and create your websites with their stores and store views (before that you'll have created one root category for each website). Reindex after everything is created
go to System -> Configuration and change the scope (the dropdown on the upper left) to one of the website. Go to the (General) Web -> Unsecure tab, uncheck the "Use Default" and indicate the domain in the Base URL field. Do the same for the secure
open the .htaccess at the root of your Magento install and at the end of it add the rules to determine which website to show according to the domain. For example, if you have set the codes website1 for domain1.com and website2 for domain2.com, put this:
SetEnvIf Host ^domain1.com$ MAGE_RUN_CODE=website1
SetEnvIf Host ^domain2.com$ MAGE_RUN_CODE=website2
SetEnv MAGE_RUN_TYPE website
and you're all set :)
HTH
Did you change your base urls for the second store configuration?
Navigate to:
System>Configuration>Web>Unsecure
System>Configuration>Web>Secure
Then change the Current Configuration Scope (top of left sidebar): your second store config
Deselect use default and enter your second store's path:
Base URL : http://yourdomain.com/
Secure Base URL: https://yourdomain.com/
I am trying to get a magento installation to run multiple websites I have completed most of the steps including a parked domain. However I am unsure as to how to answer the statement below:
Easiest amongst these is .htaccess solution which requires you to define the following lines:
SetEnvIf Host .*myhost.* MAGE_RUN_CODE="base";
SetEnvIf Host .*myhost.* MAGE_RUN_TYPE="website";
Simply ensure that .myhost. is a regex expression matching the domain for which you want to set environmental variables for.
For example do my website is www.domain.com and also www.domain1.com, magento is installed on domain.com so for the host do I put .domain.com. and leave the run code and type and base and website
What you are supposed to change is the MAGE_RUN_CODE to match the code of the site that is managed in the Magento backend. You also need to change the myhost bit match the domain name of your site.
So for example, if your site is hosted on somewebsite.com and you have two "stores" (Store View A and Store View B, Where "ViewA" is Store View A and "ViewB" is Store View B.)
You would write the following:
SetEnvIf Host .*somewebsite.* MAGE_RUN_CODE=ViewA
SetEnvIf Host .*somewebsite.* MAGE_RUN_TYPE=website
SetEnvIf Host .*somewebsite.* MAGE_RUN_CODE=ViewB
SetEnvIf Host .*somewebsite.* MAGE_RUN_TYPE=website
This assuming you made two different "Sites" in the Magento Backend. If you made a different store, you'd replace "website" with store.
More reading on the Magento renaming can be found here:
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/navigation/multiple-website-setup