We have added languages to our catalog.
If I have a coat and the description is:
"Look the ball of the party with this lovely blue coat"
and then I create a German version of the variant but I do not specify the description. When I display the variant on the site, I would like it to fallback to the English version. We are going to test adding it into the variation viewmodel and see if that works without breaking the admin. We will also then have to two db calls to get the description which isn't ideal.
Has anyone overcome this with a nice clean solution as it isn't build into commerce.
When loading a property or a catalog content version, it will fallback to the master language version when and only when the property is not multi-language. I assume that the master language of your catalog is english. In this case, if you want the description of German version fallback to the English version, you should change the Description property to not support multiple languages. But be aware of that, it will affect to the description of all catalog contents in other languages.
Thanks but how will that work. If I make the Description not support multiple languages, then how will I show some products descriptions in German. I think your suggesting not fallback but making the description not translatable which isn't really what I am after.
Sorry for the late response, I just wanted to explain how the current system work with property fallback behavior and I also mentioned about "be aware of that, it will affect to the description of all catalog contents in other languages". So correct me if I'm wrong, here are what you have and what you want?
Thats what I am after. I believe the CMS also works along these lines.
Yes, the fallback language is something usually asked for Commerce content, which does not support that feature right now. No promises, but we will look into it after Commerce 11.
Thanks Quan, we ended up writing a wrapper around the variant and wrote our fallback logic in there. It just means we have to use our wrapper and not the GameVariant all the time.