Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get a handle on Rules in Drupal. The concept seems to be very flexible and straight forward for the most part. However, I'm stuck and hoping someone can lend some assistance.

I have a Drupal Commerce store that sells two items. Gift cards and books. The store offers a volume discount of buying 3-5 books at a time. I have got the discount working using Commerce Discount and rules. The issue is the discount is added to the entire cart, not just books. Under Rules there is no way, that I can find, to select the content type of the line item being added and compare it to the books custom content type.

Can someone please explain or help me with where to look to only apply the discount to commerce products from the custom content type Books.

Here is the basic setup.. Drupal Core 7.15 Drupal Commerce 7.x-1.3 Drupal Discount 7.x-1.x-dev Rules 7.x-2.2

Books is a Custom Content Type. Discount should only be applied to Books.

Rules Setup 1. Event + Calculating the sell price of a product 2. Condition: + Entity exists by property //This one way I have tried but not working, seems the most reasonable way + Total product of type quantity comparison //This counts the total by product in cart 3. + Apply discount to product

share|improve this question

You have a rule that reacts on "Calculating the sell price of an item" and a condition of "is of type BookDisplay (whatever the real display is called)". Then in actions you just apply the discount.

I have this working on a site.

share|improve this answer

Is there a way I can add a discount to a certain product type if I use it on the same display, thus I cannot use a condition such as "node is of type x".

Background: A shop that sells magazines as Physical Product and PDF Download (two product types). If a certain amount of physical products is in the cart I grant a discount. But this discount should only be applied to physical products.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.