Magento redirect - magento

I have a store with 4 domains for all languages, so a .nl for Dutch/The Netherlands, .de for German/Germany, ect.
Something strange has happened since some time now:
If I enter the .de address I am redirected to the default store view, in my case the Dutch storeview (.nl). When I use the store selector and choose German, I get to the German store.
Next time I use the shop and enter the German domain in the address bar I am redirected directly to the right store. In this case the German store.
I know that it has to be the cookie, but how can I solve this issue?

Try setting the cookie path in system > configuration > web > session cookie to "/" and make sure you have a default store set in Manage stores > Stores .

Try to use an extension that can automatically redirect your certain customers to certain store.
Source: http://www.vjtemplates.com/magento-extensions/92-csci2store

Related

Why prestashop is adding a lang particel at the end of a multistore shop url?

I have a prestashop 1.6 installation, in multistore mode. I have some stores already running ok, but now I created a 'german' store with /de url, and have the following issue:
the shop url is something like www.example.com/de, visible and saved in admin
when I navigate to www.example.com/de, automatically I'm redirected to www.example.com/de/it/
I really cannot understand the reason why... All the other shops (fr, es) do work properly. This one does not. No way to keep it simply /de. I already setted a default language for it, I just copied all the settings from the other shops, seems all the same. I cannot spot the error. I also regenerated the htaccess. No way. Could you please suggest me why it is behaving that way?
Ah, funny thing: with firefox will go to www.example.com/de/it/ as described above, while with chrome will go to www.example.com/de/de/!!! No one simply stay www.example.com/de/.
Thank you, regards
Have a check the settings of the german store, probably you have multiple languages enabled / active in Localization > Languages and Prestashop , once you reach the shop homepage, performs a 301-redirect to the default language URL (default behaviour with multiple languages and URL rewriting).
About the funny thing : check the Localization > Localization setting "Set language from browser", this can lead to different language redirects depending of the browser language.

Magento: StoreView URL redirect for multiple languages?

In my store I have got 2 languages, English (default) and German. I also have a category, lets call it other.
The url key for other is other and sonstiges for the German view. Now, when I send somebody a link to the German view (www.example.com/sonstiges.html), it generates a 404 not found until I select German as language. Afterwards it works when the link is clicked.
I removed the store view code from my url by the way, it has to stay that way.
Why is that and how can I change it?
Thanks!
Its happening for url rewrite problem.
Example : For product if you provide different url key for different store view like different url key for English and different url key for German then if you share the url from english site and if someone open in German view then he will get 404 not found.
Solution : Go to that particular product in the admin then switch store view and set same url key for both store view. Either dont provide url key for any store view so Magento will generate by own.
Thanks .

Magento shop language switch

I have a magento shop with 2 languages. The language switcher works with set a different store view in the url.
/shop/?___store=myshop_view for mainlanguage
/shop/?___store=myshop_view_fr for french
That works fine and how it should work.
Now first problem comes when I am in french store and switch to mainlanguage with /shop/?___store=myshop_view, now I see the shop in the mainlanguage, but when I call /shop/ without any storeview paramenters it switches back to french. Why is that and can I change that?
The second problem comes with externall add to card links. A add to card link would look like: /shop/checkout/cart/add/uenc/aHR0cDovL3d3dy5teS13aW5lLmNoLnJ1dGlzaGF1c2VyLm5pbmUuY2gv/product/2169/?___SID=U&___store=myshop_view
So this link is for the main language. If the shop was in french before and I click this link, i get the success message in the main language, but the rest of the shop is french again.
I think the first and second problem are nearly the same. Then the add to card link will redirect to the shop overview without any store view paramenter in the url.
Any idea how I can get a add to card link that can switch the language of the shop?
As #RohitS said. Magento saves the storeview in the cookie, and with the url you can change the storeview temporary, but the value in the cookie is still the same.
Good thing is, that the external add to card link is on a subdomain, so I was able to set the cookie for the hole domain (by adding a dot before the domain name: .domain.com). In the cookie I just had to set document.cookie = "store=myshop_view_fr;path=/;domain=.my-shop.com"; The path attribute was important for me, cause the shop is in /shop/.

How to set the default store (___store) with Magento, excluding front/home page

My current Magento website is requesting a store (via lightbox) when the user first arrives on the home page. The user will continue navigating the website and content will appear properly without any issues.
The problem is when they arrive on a sub-page of the website and the store has not been set previously by the user. This also impacts SEO.
Question: How do I set the default store, without affecting the lightbox that is appearing on the home page.
From the comments traded back and forth, it sounds like your default store isn't set properly. If you aren't using any index.php hacks to do with store view setting, you should be able to follow the following steps to resolve this:
Magento: Setting the default homepage / store when you have multiple stores

Magento multi-domain checkout issues

I have a Magento install with multiple domains (domain1.com, domain2.com) sharing a single checkout URL (checkoutdomain.com). The problem is when I proceed to cart and do to the new domain I get "no items in shopping cart" error. For some reason the session/cookies aren't being passed to the checkout domain.
I'm running Magento 1.7. I've gone to system/config/web/session cookie management and tried all of the following values in the cookie domain field:
.domain.com
.domain.com/
http://www.domain.com
http://www.domain.com
Should something else go here?
I also have cookie path field blank (default) and use http only set to yes (default).
I'm not sure what else to do here.
The first place I'd check is your store setup. Remember that you can't easily share a cart across multiple Websites, only Stores and Store Views (to use Magento's nomenclature).
Assuming that's fine, your next problem is ensuring that all of the domains use the same PHP session. You can do this by telling them all to use the same session id. Cookies are an ideal solution for this, but cookies do not work across completely different domains.
This means we have to explicitly tell checkoutdomain.com to session that we wish to load. We can force Magento to load a specific session by passing the session id as the SID GET parameter. You can get this value by calling Mage::getModel("core/session")->getEncryptedSessionId().
You should set web/session/use_frontend_sid to yes in your system configuration.
You should also keep in mind that not specifying a cookie path will make it default to the current path you are on when the cookie is set. You should default it to "/" to make sure it is being set globally for the site.

Resources