Userpoints: how to 'spend' points when downloading a file?

mitan - August 14, 2009 - 13:06

How to implement the next: A user with certain number of points can download one or more files and because of that the user 'spend' some points in the transaction. The 'purchase' is pretended to be like a market, so using a cart with ubercart. Is this possible using ubercart and userpoints?

have you tried this:

coreyp_1 - August 14, 2009 - 15:28

- Corey

Yes, 'Ubercart Userpoints' module is being used

mitan - August 14, 2009 - 19:54

Yes, 'Ubercart Userpoints' module is installed, but what i need exactly is that when a user downloads a file the number of her/his userpoints decreases. It is already implemented that when a user add a product ( which contains a file ) to the cart and buy it the number of userpoints decreases, but it is needed that the user spend userpoints to download files, so userpoints to decrease when downloading files.
Thanks Corey.

I am not aware of any contrib

coreyp_1 - August 14, 2009 - 20:06

I am not aware of any contrib module that will handle this special-use case.

-Corey

- Corey

Cart

dambrisco - August 14, 2009 - 22:23

Why not just force users to put any files into the cart?

Or are you talking about decreasing userpoints based on the amount of time spent downloading?

How to force users to put any files into the cart?

mitan - August 14, 2009 - 23:38

Excuse me if the cuestions is easy to resolve, but how to force users to put any files into the cart? The number of decreasing points is the 'cost' or 'value' of the file, so is not based on the amount of downloading time.
Thanks dambrisco.

Im in the same boat

blueglue - October 14, 2009 - 21:54

I also have the same basic requirement, when a user downloads a file they loose a point. I have searched high and low for a solution but to no avail although there are a lot of modules for accumulating points for every action you can think of, it seems impossible to find useful things that users can actually do with the points other than get some crappy badge.

Points

dambrisco - October 15, 2009 - 21:20

You could either use the same idea I proposed for mitan, or you could potentially just take one of those accumulation modules and basically reverse it. Decrement a users point total every time they perform a download action.
This would require some module editing, something I'm not very fond of or comfortable with myself, but if you're fluent in PHP it shouldn't be too distressing.

@mitan

dambrisco - October 15, 2009 - 21:23

You'd need a cart or shopping module, and you'd have the users spend points rather than money. It would probably require some module tweaking, but I doubt it would be very messy.

Sorry for not getting back to you sooner, and hopefully my tip helps you some.

EDIT: I completely forgot that you're already using Ubercart Userpoints, which would obviously be a cart module. Given that, I'm not too sure why that functionality wouldn't be built in. You might just have to dig around the admin panel a bit. I'm not familiar with any of the shopping modules around here, unfortunately.

 
 

Drupal is a registered trademark of Dries Buytaert.