Reading http://docs.drupalcommerce.org/v2/product/purchasable-entities.html I tough I can create my own product type. But if I want to use the cart I'm obligated to enable the product module.
Would be nice to have a little example for creating a purchasable entity to make things clearer.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2853280-9.patch | 4.65 KB | mglaman |
| #6 | cart_not_dependent_on_product-2853280-6.patch | 1.78 KB | vasike |
Comments
Comment #2
gagarine commentedComment #3
gagarine commentedComment #4
bojanz commentedThat's a mistake introduced at some point. Order don't depend on Product, so neither should Cart.
Comment #5
vasikeBojanz suggestions
not sure about 2 config that depends on commerce_order
And here is a patch.
Note: maybe the config moved to optional should be on product module optional
Comment #6
vasikeit seems the previous was incomplete (didn't delete the file made optional)
Here is an updated one.
However, it seems there are some issues installing the cart module.
Exception: No entity type for field quantity on view commerce_cart_block in Drupal\views\Plugin\views\HandlerBase->getEntityType() (line 697 of /d8/web/core/modules/views/src/Plugin/views/HandlerBase.php).This seems more like other issue - Views issues for order items.
Comment #7
vasikeThere is a new PR on this
https://github.com/drupalcommerce/commerce/pull/704
with some extra updates on Checkout and some Tests
Comment #8
vasikePR "reroll"
Comment #9
mglamanReroll from last reroll.
Comment #11
jsacksick commentedClosing in favor of #3323623: Remove Commerce Product dependency from Commerce Cart and Commerce Checkout which is more recent.