0

I have a Drupal Commerce site and I'd like to apply a discount to the price where it is calculated. I have a table in the profile user with SKU | discount pairs and I'd like some way (maybe Rules?) to search the product on the table and apply the discount to the price.

Is there any way to do this in Drupal Commerce?

2 Answers 2

1

I use the Commerce Sale Price module with great success on my website. It is easy to configure. Just install and enable then you can set the discounts on the product pages.

Update: I think you could use Commerce Coupon to achieve your results. The coupons can be automatically applied based on a role. Sorry I did not understand your question fully before. Also, I have not used this module but the description appears to do what you want.

4
  • Thank you for the answer! But the problem with this approach is that the discounts on my website are per-user and not per-product. One user can have discounts in product one with x% off, two with y% off and three with z% off but another may have discounts in five with t% off seven with w% off and ten with r% off. The context seems to be pretty difficult to use Commerce Sale Price.
    – ekth0r
    Jan 22, 2014 at 14:28
  • 1
    See updated answer... Jan 22, 2014 at 15:08
  • Is it possible with Drupal Coupon to apply the discount for a certain product and user when Rules is computing the product price?
    – ekth0r
    Jan 22, 2014 at 16:47
  • I would expect so but I couldn't be sure without trying. I know I have used a similar module for one site I developed that had Ubercart. Based on the description and my knowledge, I would be surprised if this module didn't do what you want. Jan 22, 2014 at 16:52
0

I can't give solution for your the values which you saved in the user profile as I have never had that situation but I can give simple solution based on the requirement which I understood from your comment.

You can set several rules for discount based on no. of items in cart & user type.

Rules work on 3 things - Event, Condition & Action.

So your event will be - Completing the checkout process.

Condition - Total product quantity comparison & User has role(s).

Action - Multiple the unit price by some amount (Which you can set as per your discount model e.g. 0.95 for 5%, 0.92 for 8% etc).

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.