Problem/Motivation
Commerce Product dependency means that we need to have a product entity published rather than using an abstraction, with our own purchasable entity (PE) (and its bundles) we would be able to add to cart PE, build a complex widget with PE selection.
I.e. with our own PE we could add entities of any bundle to the cart in one single webform.
Proposed resolution
Provide our own purchasable entity that sits at the core of the module, with a submodule to use Commerce Product, should someone wanted to use it.
Workflow changes
Current workflow (per usual)
- Add product
- Create and assign product variations to the product
- Add webform, reference the variation on the CWO settings (product is unused)
- Reference the webform in a node, block, etc, however it is used (product is still unused)
Workflow with purchasable entities.
- Add purchasable entity.
- Add webform, reference the PE on the CWO settings (we might be able to leverage entity browser for this)
- Reference the webform in a node, block, etc, however it is used
Remaining tasks
- Add a purchasable entity
- Remove commerce product dependency
- Add a commerce_webform_order_product submodule to ease the migration to those moving to 3.x
- Tests.
Resources
- https://drupal-commerce.readthedocs.io/en/latest/v2/product/purchasable-...