Open lchrusciel opened 7 years ago
This is still needed. The current nameAxis is not really useful, especially not in a headless environment. If I give an option the codename colour with the values black and the value white, when getting my variant in the white colour the nameAxis gives you the value 'Colour White'. The axis value will be 'white' if that is the code you gave that colour. The code of the option is nowhere to be found, only the translations is now part of the nameAxis, but in a headless environment the front end would not know what in the nameAxis is the part that is the translation of the option name and what is the value part. Above solution has the same problem. The name of the option and the value need to be 2 separate things.
I tried to override the factory for a variant, but it is both final and not overrideable in the service config. I can override the ProductVariantView, but here I do not have enough information to pull apart the nameAxis.
To not make it a bc break, why not have a separate field options on the variant, with for each option the code, the translation, the possible values (for the related product) with code and translation and the chosen value for the variant as a code.
We should provide more information about product options Instead of this:
Which is quite usless compered to required data of put item to cart request:
it would be nice to provide basic information about option itself: