2

I'm trying to set up a discount in Drupal Commerce for each additional product ordered. The first product is full price and all subsequent products should be discounted $20. I can have every product discounted, but have not been able to have the first product at full price. For example, if I have 3 of the products in the cart the discount is $60 (all three products discounted) and not $40 (only the second and third product should be discounted).

1 Answer 1

0

You could potentially add a "data comparison" condition to your existing discount rule that would effectively do this:

current-user:order:line-items:0:commerce_product:id != product:id

Which would say "only continue if the first line item's product id isn't the same as this product id" but would totally fail if you had some other line item added to your cart before your first product. If that is the case, then you would need to create a custom rules condition.

Your Answer

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

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