November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
It is highly recommended, if possible, that you upgrade to Commerce 1.0 R2 SP2 as it contains fixes for multi-language product page URLs.
I have now upgraded to Commerce 1.0 R2 SP2 and the issue is still the same.
It also seems that if I'm on localhost:17000/es-ES/Product-Listing all the links (except product links) goes to localhost:17000:/en-US/Product-Listing.
The product links doesn't get any language prefix.
If I add the following code to ProductListing the links (except product links) keep the current language code:
protected override void InitializeCulture() { base.InitializeCulture(); Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; }
There url for the product detail page is mainted in the url of the seo tab of the product. If you use the same url you will need to set the current ui cultire like u have above.
Sorry, but I don't understand how it's supposed to work. How should I create links to the product pages and how do I get the content there localized?
You need to set the seo url on the seo tab of the product / sku as explaned here
http://webhelp.episerver.com/Commerce/1.1.2/Content/User%20Guide/CatalogManagement/Creating%20a%20Variation%20or%20a.htm
If you want to test the lanaguage then either switch the Thread.CurrentThread.CurrentUICulture or create a new seo url for each lanaguage of the product
When I'm browsing the normal pages, I can see that the language part of the url (http://mysite/sv/anypage/) gets picked up from examining Thread.CurrentThread.CultureCulture (sv-SE).
However in the product page links that I retrieve from ResolveUrl(StoreHelper.GetEntryUrl((Entry)Container.DataItem)), there are no /sv/ part of the url. If I go to a product page and add /se to it, like this:
http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx
I can't see anywhere that the sv-SE has been picked up. It's only en-US.
Here's what logging tells me:
[3012] 2012-05-10 16:36:17,893 [158] DEBUG EPiServer.Web.UrlRewriteModuleBase [(null)] - Starting request with Url http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx
[3012] 2012-05-10 16:36:17,900 [158] DEBUG EPiServer.Web.UrlRewriteModule [(null)] - Returning URL http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US as PageReference http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US
[3012] 2012-05-10 16:36:17,901 [158] DEBUG EPiServer.Web.UrlRewriteModuleBase [(null)] - 17.1.3 UrlRewriteModule rewrites from 'http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx' to 'http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US'
What should I do to get the Product page to work with languages?