Drupal Commerce and Rules: Challenge: prevention of the addition and/or removal of incompatible cart Product items

TODO: this content is incomplete, unfinished, or under construction.
STUB: this content is flagged as a placeholder only, with minimal content.
Keywords

At the time of writing, because Drupal Commerce does not yet have an official action for preventing addition of incompatible product items to a cart, one needs to use one of a number of tricks to handle cases of incompatible products.

Usually these involve looping over all items in a cart, detecting incompatibilities, and then removing them "after the fact", which has many disadvantages (such as the need for a message saying something has been removed from a cart and why, immediately after a message has been issued telling users an item was added to the cart, not an idea user experience).

The best starting point (one that handles many cases) is this video from Randy Fay: .

Visit also