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/.
Related
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.
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 .
I have a Magento website with some pages linked to main navigation.
For example, in my default view (Italian) I have www.example.com/italian-url-key
Then I created another page for English view with url www.example.com/english-url-key
So, when I am on the italian version of the page and try to switch to english version, this is the url that magento generate: http://www.example.com/italian-url-key/?___store=english&store=&___from_store=default and on click it gives me 404 page.
How can I fix it? I need that this 2 pages should be linked, also if url key is different.
Many thanks!
Out of the box Magento does not support URL Translation, both pages need the same URL key. Check instructions from the Magento Docs on how to translate CMS pages.
To translate a CMS page, you must create a new page that has the same
URL Key as the original, but assigned to the specific store view.
So you will either have to stick to one languages for your URLs or develop/acquire a module to do this for you. The magento-language-roots or CMSRewrites modules both look like they will achieve this for you.
You may also want to consider adding Hreflang tags to your head.phtml as you have a multi-lingual site.
This might be a basic question, I'm still relatively new to Magento. I have 2 store views in a magento project. 1 for English (default) and 1 for Japanese. While working with both store views, I noticed how if for example I switch to the Japanese store view, if I redirected to a different page or content on the store, the language goes back to English. How do I prevent the website from going back to the default language every time I change categories/catalogs?
That is all about Magento Admin setting. While creating Content Pages/Categories/products, there is a option that ask to choose Store View.
You can add content for Cateogries/Product/CMS Pages for each locale. If it is done then you'll be able to see your site content on the basis of current locale. Hence you need to go through Magento Admin first.
Hope it will work for you. Please let me know if any issue.
Managing contents in multilingual stores in Magento is easy.
Edit/Create Product/Category/Page/Static blocks according to need storeview and put content according to languages in that.
Now access pages by store code, if we are using that.
In some case we don't find the heading names according to languages so just enable inline translater from admin and do translation specific to store/website.
To run Magento store using urls we have both options index.php modifiction and using .htaccess using website and store codes.
On running Magento multisite , multistore. We generally face the common urls for media, js and other resources we should use symlink to increase SEO ranking and score.
Please feel free to contact.
Install your language package.
Create products, categories, pages, and static blocks on the basis of your selected language.
Sometimes translation does not work for few words. In those cases, Inline translation from admin will help you.
Managing content according to store view is very easy.
follow up below steps for managing content according to Store view.
Edit your product or category or your page and static block etc.
after that you can see store select left side in product and category and on page you can see feild below url in static block also. select your store view.
whater ever you want to change or edit please do according to you.
After that save it will apear only on your selected store.
Note: if you not edit any fild by store then it will show default store contents.
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