As we move on, we have learned a lot. After some support requests, discussions (mostly on slack) and some new use cases I think we should consider to refactor the bundle item a bit.

1) Remove the status flag (is active). setActive() / isActive()
Reason: The bundle item is a wrapper around a product. It shares its status. No need to track an own status. If you don't want a bundle item on the bundle, simple remove it.

2) Remove the bundle item price override:
Reason: It seems conceptual wrong to me. The bundle item wraps a product and may reduce the variations available on the bundled product. The product has no price. It's the variations that determine the price in drupal commerce. A global override of all available variations seems wrong. It's the same as if products could override the price of it's variations.

3) Add the possibilty to flag an bundle item as optional.
Reason: Opens up more use cases, e.g. Upselling.

4) Remove getType(). We have that functionality allready in Entity_Interface = getEntityTypeId()

This is not a decided thing. I would like to discuss this, before doing the work.

Comments

olafkarsten created an issue. See original summary.

olafkarsten’s picture

Issue summary: View changes

add the getType() method to remove

olafkarsten’s picture

Status: Active » Fixed

Left the unit price. Removed the other stuff. Adds the required flag.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.