The rules 'Add a product to the cart' assumes that you want a 'product' line item to be created. What if you want to add a specific line item type? How can you do this through Rules? Only way that I have fond so far is to use the Entity Rules to create a line item Entity of my desired type, although it when I do it that way it doesn't seem to get associated with the Order correctly and doesn't show up in the cart.

It would be good if the 'Add a product to the cart' Rule would let you specify what kind of line item should be added.

Comments

rszrama’s picture

Status: Active » Postponed

I'm divided. If you look at the issue we used to add this, we said the Rule would have to be limited. If you're using custom product line item types, there's also no way for the Rule to specify values for the additional fields right now (though there is a workable solution for this described in the issue). I'd really just want to recommend using the API directly (which I think was my summary there) but can leave this postponed for additional consideration.

rszrama’s picture

Status: Postponed » Closed (won't fix)

Reviewing this issue, I'm going to stick with the idea that it's out of scope for core. It could be something we introduce to Commerce Customizable Products, but I think we'll ultimately be served better by the deeper association between product types / products and line item types that that module is aiming for.