Fallback language in Commerce

Vote:
 

Hello,

I would like to implement a fallback language in Optimizely Commerce. I found some solution on ⁠github that I have implemented. 
Unfortunately it works not for all catalogues. And I cannot understand why it only works for some catalogues.

 Please follow my examples. First catalog is working fine, but the second one isn't (I mean, I got 404 error). 
The only thing I've noticed is difference between the SEO URL parameters, but it is wired because I don't use the SEO URI format.

 Example 1



Example 2


What is more, the second example works correctly when I have changed the Name in URL parameter (I've added suffix gb).



Could someone please help me understand what is wrong?

#295370
Jan 26, 2023 9:55
Vote:
 

The code in question only fallback to netural version.  

https://world.optimizely.com/blogs/Mark-Hall/Dates/2020/4/fallback-languages-for-catalog-content/

#295385
Jan 26, 2023 17:10
Vote:
 

Aslo full support is available in commerce 14, you should consider upgrading

#295386
Jan 26, 2023 17:22
Vote:
 

Thank you for your reply. In my previous message I forgot to add that I've modified the GetNeuturalLanguage method. It is my current definiton

private static string[] GetNeuturalLanguage() {

               return new string[] { "en-GB" };

}

 

I've tested the fallback language in Foundation project (.NETCore version) but unfortunetly it doesn't work.

These are my steps to configure the fallback language in the Foundation project.

  1. Go to CMS -> Admin -> Config and I enabled en-US language
  2. Go to CMS -> Home page -> Language Settings and I set fallback language as below

      3. Go to Commerce -> Fashion catalogue and I ticked the English (United States) checkbox and published the catalogue.
               

      4. Go to the pages

https://localhost:5001/en/fashion/womens/womens-tees/ - it works ok

https://localhost:5001/en-us/fashion/womens/womens-tees/ - I got a 404 error

Do you have any idea what I have done wrong?

#295455
Jan 27, 2023 15:40
Vote:
 
#295574
Edited, Jan 30, 2023 3:07
Vote:
 

Thanks. It works well in the Foundation project (.NET Core version). 

But in the .NET Framework I still have a problem.
I've added this code to the Foundation project (branch full-framework/master) and I've noticed that this implementation does not work for this product
http://localhost:53396/en/fashion/womens/womens-shoes/p-42708712/
http://localhost:53396/fr/fashion/womens/womens-shoes/p-42708712/

This looks like the same as the issue in my application. Do you have any idea why the above example doesn't work? 

#295669
Jan 31, 2023 15:42
* 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.