Fallback languages and URLs in Commerce

Vote:
 

Hello,

We are trying to mimic support for Fallback languages in Commerce. For now we are able to take the entry content with fallback support, but we are having an issue with the URLs. For example,

  • we have 2 languages: {en-us} Master language and {en-gb}.
  • 1 product is created in {en-us} language and does not have a version in {en-gb} language
  • The URL for en-us language is /en-us/catalog/node/product1 and when browsing to it we see the product detail page. However when we navigate to /en-gb/catalog/node/product1 we get 404 which is understandable, because there is no content published in that language.

My question is: is there a way to allow /en-gb/ URLs for commerce (even if no version is published in that language) and handle the loading of the content myself?

Thank you!

#148723
May 21, 2016 20:59
Vote:
 

Hi Adrian.

I've been in the same situation as you. Unfortunately, Fallback and Replacement Languages are deactivated in Commerce. It means that your experience is by design and requires you to add some customized code in order to easen the way of working with Language Branches and Catalog Content.

I spent some time on investigating the opputunities of changing this and ended up with an implementation that pre-fills the Properties when your Editors in Commerce changes between un-published Language Branches. Basically, they can activate/publish the en-GB product simply by clicking Publish wihtout having to copy paste all the characteristics. It has even been described in a fresh Blog Post, that I published 5 minutes ago. :-)

http://fellow.aagaardrasmussen.dk/2016/05/22/optimized-language-support-in-episerver-commerce-with-fallback/ 

I hope it helps you getting closer to your need. I am convinced that you can ensure that your Language Branches (e.g. en-GB) are automatically published by adjusting the implementation of my ICatalogContentBuilder examples. 

Have a good day.

Casper Aagaard Rasmussen

#148730
Edited, May 22, 2016 16:33
Vote:
 

Hi Casper,

Thank you very much for your answer. We continued our investigation and tried to see if we can leverage a custom implementation of HierarchicalCatalogPartialRouter but with no luck. It still gives us 404 when accessing the product link in an unpublished language. So the ultimate solution for us was to publish all the products in all languages. This was easy for us, as we import them daily, but we have 20 languages supported and we would've preferred to not duplicate the data and keep the db cleaner by creating a fallback mechanism. 

Thank you for your input and help.

Adrian Stanescu

#148796
May 24, 2016 12:20
Vote:
 

Hi,

Happy that you found a solution that works. Approach is quite similar to mine - biggest difference is that you are automating how Content is "replicated" via your import where I, on the other hand, allows Editors in Commerce to do it via the authoring workflow.

Regarding the PartialRouter approach. I originally tried the same, but ended up skipping it due to obvious issues. Your XML Sitemaps and Search features would be compromised because content is, on en-GB, inaccessible via Episerver Find and ContentRepository.

Have a good day.

Casper Aagaard Rasmussen 

#148809
May 24, 2016 14:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.