Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin UI: Enable translation of product option groups (add/modify/remove too) #965

Closed
skid opened this issue Jul 2, 2021 · 4 comments
Closed

Comments

@skid
Copy link
Contributor

skid commented Jul 2, 2021

Problem
There is no way to add translations to a product option group since there is no way to modify option groups once the product is created. The language selection is only available for a created product, at which point the option groups are fixed.

Solution
A good solution would be to allow for modification of product option groups on existing products. This would allow to change the language and translate the option group names.

@michaelbromley
Copy link
Member

michaelbromley commented Aug 30, 2021

For now I will address the main part of this issue - the ability to add translations of ProductOptionGroups. My idea is to possibly add a "Group name" input to this existing dialog:
image

or to add some new "option groups" indicator somewhere on the Product detail tab. Going to explore the options.

I'm not 100% clear on what is intended by "allow for modification of product option groups on existing products", but if you can clarify how you think this feature should work, please feel free to add a comment here. Maybe then we can open a separate feature request if it makes sense.

@skid
Copy link
Contributor Author

skid commented Aug 30, 2021

This comment was added before Vendure 1.5 I think. There was no "manage variants" function at that point (or maybe I haven't noticed it). Anyway - adding the ability to edit translations would solve most of the problems.

This is the "manage variants" screen in Vendure 1.5:

Screenshot 2021-08-30 at 16 58 46

There's a few things missing here:

  1. The existing option group's name can't be edited ("testing")
  2. The existing options in testing can't be removed
  3. When you click "add option" by mistake, you can't remove it, so the UI doesn't allow you to save changes with an empty option, so you need to refresh the page losing any changes.

@skid
Copy link
Contributor Author

skid commented Aug 30, 2021

From what I can see, you generate a "potential" variant for each option combination. You do this automatically, by generating all possible variants in the manage variants screen after which you "select" which one of them to be made into an actual variant.

I think that a simpler solution is to make the variant generation explicit. You just set up the option groups and options (including their translations) and then you have 2 buttons: "generate missing variants" which adds variants for each option value combo in the UI - they still need to be explicitly saved, though. The second button is "clean up extra variants", which will remove variants that have unknown option values after you've removed some options.

That being said, I don't think that a relation between option groups and options and variants is necessary. Variants should be able to exist on their own, even if no options and option groups are defined - options and groups are just a helpful way to generate them in bulk.

Anyway - not sure how useful this comment is, just putting it there.

@michaelbromley
Copy link
Member

The "manage variants" button has been there for a while now, you must have just noticed it.

Thanks for the feedback. For now I decided to add a dedicated screen in which you can edit the names/codes of all the Product's ProductOptionGroups & ProductOptions. This should make adding translations much faster, as you no longer need to click on each option and edit individually.

In a future version I would consider optimizations to the product creation workflow. For now I will leave as-is because I have higher priority issues to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants