Are Variations in Commerce Product required or not?

Created on 29 August 2024, 4 months ago

Using the administration, it is possible to create a Commerce Product without Variations, even if Variations are required.

The same is not possible using Feeds module, because Variations are required. Only if "Skip validation - Not Null" is enabled.

In my case, I would create a Commerce Product that has one or more sample books attached that contain the samples. Each sample has several Commerce Product Variants. It works, but is it right? Variations are not required.

Feature request
Status

Active

Version

2.39

Component

Developer experience

Created by

🇨🇿Czech Republic Xperd

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

Comments & Activities

  • Issue created by @Xperd
  • Status changed to Fixed 4 months ago
  • 🇮🇱Israel jsacksick

    If you want to allow purchasing a "product", then variants are required yes... Otherwise, I guess it is possible to use a product just for display (like a node entity), but in general variants are absolutely required.

  • Status changed to Active 3 months ago
  • 🇨🇿Czech Republic Xperd

    Maybe I'm wrong, but commerce_product_variation is purchased. Commerce Core allows you to create a product without variations, even if it is required.

  • 🇩🇪Germany Anybody Porta Westfalica

    @xperd that's right and I think there's room for UX improvements, especially for (not seldom) cases where products have no variation (which means 1 variation ;)). Maybe there are already maintainer plans for that. I can just tell that clients are also confused in most cases.

    A possible workaround is for example to place the variation field on the product form and use https://www.drupal.org/project/inline_entity_form to have it right in place, but that also has some downsides and I think it would be worth a general UX improvement.

    Much word to do in this large project and this is open source, so let's do it together! :)

  • 🇷🇸Serbia bojanz

    A possible workaround is for example to place the variation field on the product form and use https://www.drupal.org/project/inline_entity_form to have it right in place, but that also has some downsides and I think it would be worth a general UX improvement.

    But we do that automatically when you uncheck "Allow each product to have multiple variations" on your product type, implemented and released 6 years ago. Or am I misunderstanding what you're proposing?

  • 🇩🇪Germany Anybody Porta Westfalica

    @bojanz thank you for that hint, I have to admit that I never used that function (operationally blind) as we always assumed we'll have variations. Sorry, mistake on my side and thank you!

    Maybe still there might be good ideas to improve the product & variations UX, I'll think about it based on this information. And it was never ment as any kind of negative criticism, Drupal Commerce and Centarro are great!

  • Status changed to Closed: works as designed 26 days ago
  • 🇨🇿Czech Republic Xperd
Production build 0.71.5 2024