Currently, there are 3 events available around the cart:

  1. Before adding product to cart
  2. After adding product to cart
  3. Before removing product from cart

What I'm missing is the event "When changing a product in the cart" which should be fired if the quantity or any other attribute of the product gets changed.

I know, there is an event with line items, that sounds applicable, but that doesn't provide the order as a parameter to the conditions or actions.

Are there any reasons why this is not available? Or another workaround?

Comments

rszrama’s picture

Status: Active » Closed (won't fix)

If I understand you right, this isn't necessary. Every Commerce line item references its order, so you can traverse to it if necessary through the Rules data selector.

jurgenhaas’s picture

Sounds reasonable and I can confirm, that within the line item I can find the order object. What's missing however, is the product-type. Any chance of getting hold of that?

rszrama’s picture

You can get there through the commerce_product field; you just have to use entity has field first.