#3089040: Single product with multiple variation types added the ability to leverage multiple variation types for a single product type. However, if there are pre-existing products for a given product type, the Variations section is greyed out with the message "Products exist for this product type, you can no longer edit this setting."
Ideally we'd be able to add additional variation types to these "locked" product types. This would likely mean disabling/making the readonly the checkboxes for previously selected variations as opposed to disabling the entire field. Since this feature is not (to my knowledge) provided by core, we might need to add a dependency on something like Form Options Attributes unless there's another way to do it.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3270838-3.patch | 2.96 KB | jsacksick |
Comments
Comment #2
mrweiner commentedJust a note that I enabled the field via form_alter and added some extra options for one of these product types. On first review, nothing seems to be broken, but probably important to note that the next config export resulted in both the old and new variation values being present (i.e. variationType and variationMultipleTypes, or whatever the new key is). We may or may not need some handling for this.
Comment #3
jsacksick commentedI've been looking into this and I actually don't see really see why we should have that restriction in place. I changed the variation types setting after I had variations of that type associated to existing products and it didn't break.
For reference the check was "loosened" as part of #3014686: Loosen the variation type disabling on the product type form because previously the setting was completely disabled if the product type wasn't new.
I double checked the code... I really don't see how it could break if the setting is changed...
Comment #6
jsacksick commentedSo I've been discussing this with @rszrama and the only place where it could "break" is the product variation collection access (i.e the variations list). So for example if a previously selected variation type is unchecked, but a product still references variations of that type, a customer with the permission to manage variations of the type unchecked won't be able to access the "variations" tab, I think we can live with that and simply document this.
Committed!
Comment #7
mrweiner commentedGreat, thanks!