Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

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.