Hi there,

I've been struggling to configure commerce_credits, and I thought it best to ask if my use case is even possible before I continue further.

My use case:

  1. Upon being assigned the role of member (or some other event, this'll do for now) I want to grant that user a 5 credits for product A and 2 credits for product B.
  2. User browses the site, adding products to their cart.
  3. Upon checkout, the cart displays deductions based on the credits currently in their cart. eg. If they have 3 of product A, all three are free; if they have 4 of product B, 2 are free and the remaining 2 are normal price.
  4. Upon purchase, the credits used are subtracted from them.

Is this an appropriate use case for commerce_credits? If so, roughly how do we go about this?

Comments

guillaumev’s picture

Hi,

Sorry for the late reply, but I'm really busy these days and I must admit I don't have much time to develop on the modules I created.

Anyway I think your use case is possible with commerce credits, but not out of the box: in other words, it will require some code. You will need to create a rule called for example "Assign credits" which will assign credits to a user on an event (in your case, when user adds a product in his cart).

Then, on checkout, you will need to add a custom rule again in order to add reductions based on the credit a specific user has.

Your use case is quite complex, and I don't think you will find any module on Drupal which will allow you to do it "out of the box". However, I would advise you to look at the userpoints module (http://drupal.org/project/userpoints) and decide on which one will be easier to customize for your use case...

guillaumev’s picture

Status: Active » Closed (fixed)