10

By default Magento doesn't support translation out-of-box for error pages, and requires some customizations to allow for such features. So technically there is no proper way to do such. Since the full stack is NOT initialized during error generation, normal translation functionality $this->__('foobar'); won't work in the templates. Some details on how ...


7

Maybe this will help anybody, I use this in my index.php and works like a charm :) switch ($_SERVER['HTTP_HOST']) { case 'www.domain-x.com': case 'domain-x.com': $params = $_SERVER; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'x'; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; $...


5

You don't need to edit the index.php or .htaccess files. You just need to add the ENV variables to your vhosts file after you have setup the store in the magento admin. Here is an example vhosts file for apache 2. The main website is "mysite.mg" and two sub-sites "french.mysite.mg" and "german.mysite.mg": <VirtualHost *:80> ServerName ...


4

One possible solution is to change the your page/switch/languages.phtml file Find the line that reads echo $_lang->getCurrentUrl() And replace with echo $_lang->getCurrentUrl(false) Option 2 Go to System -> Configuration -> Web -> URL Options and set the 'Add Shop Code to URLs' option to Yes This will make the urls to the store appear like the ...


4

I've done a setup with Magento 2.2 and nginx before, but with subdomains instead of folders. So the setup was: nl.domain1.com, en.domain1.com,... nl.domain2.com, en.domain2.com,... etc. This is a modified version of the setup, maybe it helps you getting started. Another/additional idea: Create 2 nginx config files (one for each domain) and use alias for ...


3

how to create multiple website check this also In admin panel, go to System->Configuration and click on “Manage Stores” Click on “Main Website” to change it’s name to “Website 1″ or however you want to call it. (I’ll call mine “Website 1″ for the purposes of this article). In “code” field there, write something like “website_1″. Do same for “Main Website ...


3

Magento Enterprise does this with a redirect as soon as the __store parameter is recognized and the store cookie has been set. With an observer on controller_front_init_before you should be able to rebuild this feature for CE.


3

Thanks to @mbalparda and this article Actually setting the option "System > Config > Web > Add Store Code" to YES: removes __store from the url because Magento now uses /storecode/ to identify which store needs to be opened. Open question: is how does this work with storeviews that are on different domains? Here I don't think you would want this setting ...


3

one way to handle this would be create a public folder into your magento root inside that public folder you can create your subfolders us, nl and inside of those subfolders you can clone index.php and .htaccess files and create symlinks to ../../skin, ../../errors, ../../media at this point you can edit .htaccess freely and index.php freely to set your ...


3

Well, I believe the easiest way to do what you're asking is to put the store view in the URL. Although there is another method that I know of. 1) http://docs.magento.com/m2/ce/user_guide/stores/store-urls.html You could follow this method to include the store view in the URL itself, and then when you link you can post the different stores in various links....


2

It seems so simple but I have found a solution (may not be the best). Open index.php to edit and comment out line $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; Add the Switch command switch($_SERVER['HTTP_HOST']) { case 'B.com.au'...


2

Maybe an observer will do the job? E.g: class My_Awesome_Model_Observer { public function syncDescriptions($observer) { $productId = $observer->getProduct()->getId(); $storeAEnId = 1; //store view Id for English store A $storeBEnId = 2; //as above for store B $storeAFrId = 2; //store A French view's id ...


2

Update: Found another way for translated maintenance page: https://github.com/OpenMage/magento-lts/blob/1.9.3.x/errors/processor.php#L160-L162 if (isset($_GET['skin'])) { $this->_setSkin($_GET['skin']); } The maintenance page constructor accecpts a skin POST parameter to change layout. It seems to be the intentional way, but it not ...


2

As mentioned before there's no easy way to translate maintenance page. There's one workaround for it however (which has it's own number of advantages/disadvantages) -- use some of the maintenance mode extensions, such as this one: http://www.magentocommerce.com/magento-connect/store-maintenance.html It displays maintenance mode page AFTER Magento stack has ...


2

I had that issue some times ago, it is related to form key. For some reason form key is missing in your template under persistent/customer/form/register.phtml and in your customer persistent/customer/form/login.phtml put this code under your form <?php echo $this->getBlockHtml('formkey'); ?> This post will help you http://www.hellothemes.com/...


2

It should be $this->getRequest()->isPost() and not $this->getrequest()->ispost()


2

As you are not using Multi-stores functionally that it become too different to track each of event of one store and then transfer to master website. Suppose,You will try to like soap api,rest api, Event/observer and other customization. Then it would create hug perform issue between two website as every time,data will synchronize between site. In my ...


2

Export customer list, and change _website field to correct one for particular customer. And then import the list again Make sure to take backup


2

The Add to Cart buttons started to work when I performed these 2 tasks from command line: php bin/magento indexer:reindex php bin/magento cache:clean For a reference, I set the Cookie Path to be / for all Stores as follows: I did not change Cookie settings and am using default for Default Config and Main Website. The Cookie Path is set for Store View 1, ...


2

Indeed you cannot use the same code for 2 store views. And I don't recommend removing the restriction since magento counts on the store view code to be unique. So I don't think there is a way to have the store codes in the url just by enabling them in the backend. But you can create actual folders named en, fr and so on and make these folders act as the ...


2

This is standard feature of Magento. You can create multis-stores/multi-websites in admin and can assign different products to each store. You can display a pop-up page on loading of site and can give option to chose from 2 store. And you can load specific stores accounting to selected choice of customer. Below are few links to create multi-stores and ...


2

Please follow http://vagento.com/setup-multi-store-multi-domain-magento-2/ link. I hope that'll help you for Setup Multi Store With Multi Domain in Magento 2.


2

You don't have to anything in index.php, just add following in .htaccess or in your apache hosts file: #first website with www or without www SetEnvIf Host ^www\.aaa\.nl MAGE_RUN_CODE=base SetEnvIf Host ^www\.aaa\.nl MAGE_RUN_TYPE=website SetEnvIf Host ^aaa\.nl MAGE_RUN_CODE=base SetEnvIf Host ^aaa\.nl MAGE_RUN_TYPE=website #second website SetEnvIf Host ^...


2

Before worrying about why it happens, you may want to consider whether it's actually a problem for you. It seems to be that having a leading dot shouldn't be affecting cookie behaviour in the browser. The leading dot means that the cookie is valid for subdomains as well. RFC 6265 Section 4.1.2.3 defines this as so modern browsers should ignore leading dots ...


2

Yes that should work. If you change the A-records for the domain of your primary store (e.g. domain1.com and www.domain1.com) in the DNS server to point to the IP address of your new server you should get wat you need: All requests for your primary store are routed to the new server. All requests for your secondary domain (e.g. domain2.com and www.domain2....


1

Yes this is super weird :) Magento allow multi domain setup web site without creating two separate installations Stores -> Settings -> All Stores Let’s look at each of three options Web site We need to focus on web site section of all stores. In default Magento comes with one web site (base). If you need more domains you need to create more web sites. ...


1

Using Magento 2, we can implement multi domain with single Magento 2 installation. and there is no need to create separate folders like /a/public_html/ & /b/public_html/ You can read this docs for more clarification. Read More


1

You should check cookies domain under core config data database table.this is something relating to cookies. Can you clear cookies and open your subdomain (not main domain), and try to register? It should register successfully


1

I had a similar problem with a theme i've installed. And adding the form key solved my problem, but i have added as a hidden to the register.phtml as follows: File Path: app/design/frontend/default/theme_folder/template/persistent/customer/form/register.phtml Line added after the opening <form>: <input type="hidden" name="form_key" value="&...


1

If using the latest version of magento (1.9.2.2) the security patch is included which adds a formkey to the following file: app/design/frontend/base/default/template/persistent/customer/form/register.phtml If you have overridden this in your theme you will need to add the following code in below the opening <form> tag: <?php echo $this->...


Only top voted, non community-wiki answers of a minimum length are eligible