0

I created this simple rule to give authenticated users 50% discount. The individual line items are not being changed as I would expect, only the order total. And before the order total is discounted 50% it's actually doubled in price, so the order total does not actually change from what it would be without the rule.enter image description here

Subtotal, discount, and total are all double what they should should be. I have no idea why.

Here's there rule:

{ "rules_wholesale_discount" : {
    "LABEL" : "Wholesale Discount",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "commerce_line_item", "commerce_product_reference" ],
    "ON" : { "commerce_product_calculate_sell_price" : [] },
    "IF" : [
      { "user_has_role" : {
          "account" : [ "site:current-user" ],
          "roles" : { "value" : { "2" : "2", "3" : "3" } },
          "operation" : "OR"
        }
      }
    ],
    "DO" : [
      { "commerce_line_item_unit_price_multiply" : {
          "commerce_line_item" : [ "commerce-line-item" ],
          "amount" : "0.5",
          "component_name" : "discount",
          "round_mode" : "1"
        }
      }
    ]
  }
}
0

Answer: It doesn't. The checkout page just makes it look like that because all those line items have already had the discount applied to them and the view does not show that.

So my new questions are:

  • How to display original price on the product display? (Because only the discounted price is shown to authenticated users)
  • How to display the original price in the cart and checkout forms?

But original question answered.

| improve this answer | |

Your Answer

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

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