1

With Drupal 7 using Rules 7.27, I've installed and set up Drupal Commerce with no real problems.

The rule ‘Create a new account for an anonymous order’ works well but I need to add a condition that only executes the action of creating a new account only if the product being ordered is a Commerce License. Commerce License is an entity so I tried both of the following conditions, but they prevent the Rules actions from triggering:

Entity is of type: Parameter: Entity: [site:current-cart-order], Entity type: Commerce License

Entity is of type: Parameter: Entity: [commerce-order], Entity type: Commerce License

It's apparent I don't have a full grasp of how to tell the Rule that the order processed is not just any old order but a specific order type. I would be fine with identifying it with any criteria possible, like product/order name, but it seems that I've hit a blockage in understanding the whole Commerce universe in relation to Rules.

Does anyone have any idea what conditions to specify to tell the actions only to fire if the order is for a commerce license?

  • 1
    Loop over the line items and check the type of each? – Clive Jan 23 '15 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.