Single product with multiple variation types

Created on 20 October 2019, about 5 years ago
Updated 14 August 2023, over 1 year ago

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.

Feature request
Status

Fixed

Version

2.0

Component

Product

Created by

🇺🇸United States nathaniel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany adam1

    I'm going to set up a book shop with Drupal 10, which offers printed books and open access books for download, so I came across this issue. Can some one tell me if this patch is incorporated in Drupal 10 or do I have to patch? Since it's a community project that has not much funding, I don't like to do patches because future maintenance may get harder.

  • 🇺🇸United States john.oltman

    Hey adam1, as noted in comments 60-62 and the issue status of "Closed (fixed)" a patch is not necessary - this feature has been released.

  • 🇩🇪Germany adam1

    Thank you for clarifying!

Production build 0.71.5 2024