Add a Purchasable Entity that removes Commerce Product dependency

Created on 9 November 2022, over 2 years ago
Updated 31 August 2023, over 1 year ago

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-...

Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

🇪🇸Spain pcambra Asturies

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.

Production build 0.71.5 2024