One of my clients recently requested the ability for his Users with a certain role to be able to sell files and get commission from their sales. The first thing that popped into my mind was Ubercart Marketplace (since we already were using Ubercart). Ubercart Marketplace is a wonderful module made by Turgrid, a very talented developer. Originally a Drupal 5.x module, he has now ported most of the functionality over to Drupal 6.x. One thing that he had in the 5.x version was the ability for sellers to sell file downloads. This hasn't been ported to the Drupal 6.x version yet though.
This was exactly the functionality that I needed, however, so I set about looking through the mp_file module in the 5.x version to see what could be done to update it. One of the major problems was the FileField API had changed considerably in the 6.x version, and since documentation was pretty scarce for it, I had to look around in the FileField files for clues. I also had to change some of the Ubercart functions and add some to work with the upgraded uc_file module.
In the end I was able to upgrade everything in mc_file.module to Drupal 6.x API, except for some of the FileField functionality. The solution is still a bit rusty and you must use this at your own risk, but here is how you can do it yourselves. First, download my version of the mp_file module. Put this module in your ubercart_marketplace module folder. Enable the module. Then go to your settings page for Ubercart Marketplace (http://www.yoursite.com/admin/store/settings/seller). Enter the name of a field you will create for the file download (I used 'download'). Make sure that the checkbox is checked to allow sellers to sell files. Now, go to edit the content-type for the product you should have already made for sellers to sell (mine was product_video) and create a new field for it (using CCK). Name the field the same thing you entered earlier in the seller settings page for the download field (mine was 'download' remember?). Make it be a FileField widget item, and set all of the settings there. Save everything and that is it. I got this to work just fine by following these steps.
If you are having any problems, just post the comments below and I will try to help you with them. And if you found this helpful, please let me know by visiting my sponsors. Thanks!

Thank you for sharing my project really needs that module and i will definalty use your mp_file Thank you . if i see any bugs i will report
Glad to hear someone has found it useful. I wanted to make it a bit more seamless, but haven't got the time right now. Let me know if it works for you or if you have any problems/bugs.
Hi Leighton,
Would an affiliate module be more appropiate?
Just putting ideas forward.
cheers
Ed
Ed,
The module here is not affiliated with my Paypal Subscriptions module. I am working on an affiliate module which works with my Paypal system, allowing users to refer others and earn a percentage of what the referred user purchases (including user subscriptions fees). I expect to have something like that finished by next weekend. To read more about it, see this post: http://www.moneyscripts.net/forums/feature-requests/2009/07/2/incorporat...
-Leighton Whiting
Post new comment