I have problem with commerce order total counting.

Every product has two prices (two fields). One price for everybody and second for exact role. I have rule which change prices if user with exact role is logged in.

When i browse product with exact role all prices are ok. If i add some product to cart a go to my cart product prices and total price is still good. But when i go to checkout total price is set to 0.

In checkout are all products with good price but total price is 0.

Rule for changing price is simple:

event: calculate product price
condition: user role
action: set a data value (commerce-line-item:commerce-unit-price -> second price field)

Do anybody know what could be wrong? Thanks for every advice.


1 Answer 1


Try to downgrade rules to v 2.7. For more details look at https://www.drupal.org/node/2408705

Important: Rules 2.8 has a critical regression that causes checkout rules to not work. Follow #2403851: Commerce pricing rule not working for more details, and downgrade to 2.7 for now.

  • Thanks for your answer. I just checked and I use commerce 7.x-1.9 and rules 7.x-2.7. Does it work if you use commerce 7.x-1.10 and rules 7.x-2.7? Do you use same rule like me?
    – marysmech
    Jan 19, 2015 at 12:00
  • 1
    In my working example I use another rule action: "Multiply the unit price by some amount". In your case it's better to use action "Set the unit price to a specific amount". NOTICE: you should add a rule condition "Entity has a field" with the field to your "second price field". Otherwise you can't see this field in fields list inside the action "Set the unit price to a specific amount". Jan 20, 2015 at 4:37
  • I was using commerce-7.x-1.11 and rules-7.x-2.8 in Drupal 7 and met the same trouble, as on 2015-02-01. Some (or all?) Rules that work on each line-item did not work in checkout; the prices that are modified with a custom Rule for each line-item do not propagate to the checkout. Downgrading Rules to 7.x-2.7, as suggested, worked immediately. Ta! Feb 2, 2015 at 11:41
  • @PeterLozovitskiy Thanks a lot. Your suggested action solved my problem.
    – marysmech
    May 28, 2015 at 18:44
  • Does Rules 2.9 work? Aug 11, 2016 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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