Ubercart Limit Download Per Role


This module is created for limiting the number of time a user can download based on role and time duration.

Currently the module can:
1. Provide Download button that is not related to cart
2. User who has X role can download X time per X duration (day/week/month/year)
3. User who doesn't have 'access drupie download role' is excluded and cannot use the download button
4. The download counting is based on per product SKU.
5. User can still download past registered product download regardless of current download limit.
6. Multiple product per SKU will be recorded to user user/X/purchased-files and the latest version is fetched for download

The module state is in very early beta, Don't use it on production site unless you know what you are doing.

You need to print the button manually in your theme, you can do that by :

// note : you need to replace the $product->node to valid variable in your theme that contains the product SKU eg. $node->sku
if (module_exists('drupie_download_role')) {
$output .= '<div class="product-button">' . drupal_get_form('drupie_download_role_download_button_form', $product->model) . '</div>';

dependencies :
1. uc_file

recommended to use :
1. uc_recurring to handle the selling of role access

The module is sponsored by http://www.drupalstore.info
Feel free to use it and kindly report any bug that you encounter

drupie_download_role_1.beta_.zip4.13 KB