Problem/Motivation
I have a use case where a product needs multiple variation types. For example a book with the following variations:
1. Hardcopy (variation type 1)
2. Paperback (variation type 1)
3. PDF file (variation type 2)
4. Audio file (variation type 2)
Where variation type 1 works fine as a regular product variation, but variation type 2 is working with commerce_license and a D8 port of commerce_file. Product option 1 and 2 (Hardcopy and Paperback) will be shipped and will NOT include a file or license. Where options 3 and 4 will NOT be shipped, but will include a downloadable file and a license (handled by commerce_license / commerce_file).
Proposed resolution
It would be great if I could use different variation types for the same product, then they can be used as different options for the same product, instead of splitting the different options into two different products (when they are the same product – same title, description, images etc.).
Remaining tasks
Figure out the best approach and write some codes.
User interface changes
This may include checkboxes or multi-select field for product variation type on the product type settings page. But also maybe a way to select default variation type. If the current product variation type is used as the default that might help make the change a little less intrusive.
Maybe a select box for product variation type on the add variation page that appears only if a product type has more than one variation type option.
Original report
I’m adding what looks like a related issue
#2880602: One Product types for many Product variation types →
. Also adding the commerce_file port as a related issue. I realize that there will be other issues to face for this use case, but this seems like a good start.
https://www.drupal.org/project/commerce_file/issues/2875904#comment-1330... →
Any feedback on this issue, reasons not to use this approach, or maybe direction on where to start if an additional contrib module is a better option, or where to start for a patch, would be appreciated.