I'm currently at the Drupal Commerce Camp in Switzerland and we're discussing how to use user points as a virtual currency and integrate it nicely with Drupal Commerce.
Your module is a nice starting point and supports one use case that I haven't thought of, but I would like to support at least two other use cases. Maybe in separate sub-modules or maybe even as separate projects. We'll see about that.
Here they are..
- Allow to set a price of a product in points. We're still discussing how exactly to do this, but maybe we could create a "Userpoints" currency and a corresponding payment method that is automatically activated when that currency is chosen. I need to talk with the Commerce Guys here how this is best done. This is for cases where you for example either only want to sell a product with userpoints or for a different value (e.g. 10$ or 1000 points).
- Revert the whole thing: Create a "Userpoints product", that allows to buy userpoints with real money. This could for example be done by adding a special field to the Product that contains the amount of points that is granted when this product is bought. The points could then be used as a virtual currency on the current site, e.g. 10 points to create a node (userpoints_nodelimit), or gain access to a node (userpoints_nodeaccess). Or alternatively, say that 1 product = 1 point and allow to buy 10, 100, or 1000 of that product.
What do you think?
Interested in implementing/supporting/maintaining these use cases with your project? I would help of course..
Comments
Comment #1
BerdirSee #1269122: Userpoints Payment Provider for an implementation of a payment provider.
My suggestion would be to have a separate module in this project per use case (and e.g rename the current module to commerce_userpoints_discounts or something like that)
Comment #2
liupascal CreditAttribution: liupascal commentedCompletely agreed ... If the user is interested i using points as "discount" he'll probably won't mix it with the "payment provider" system
I'll change my sandbox module name to commerce_userpoints_discount
Comment #3
BerdirI have now renamed the module (again) to commerce_userpoints_discount.
The next step will be a common commerce_userpoints module that allows to set up each userpoints category as a currency and also provide some other helpers which are possibly useful for all/other use cases.
Comment #4
BenK CreditAttribution: BenK commentedHello Berdir! Interesting stuff... hope to get back into more projects like this very soon.
--Ben
Comment #5
mrfelton CreditAttribution: mrfelton commentedI think this can be considered fixed now. We now have the following modules, which can satisfy the usecases described in this issue.
commerce_userpoints
commerce_userpoints_discount
commerce_userpoints_payment_method
If people want to support additional use cases, please open separate tickets for these.