Adds external downloads as a Ubercart product feature so an external url can be downloaded after purchasing. This module is a direct copy of the uc_file module modified to allow external file downloads.

The uc_file module allows you to set a file to be downloaded. But what if you use a third party to serve files? This module allows you to add a URL rather than a file for the user to download. The URL is never shown to the user and is served just like normal files. Instead of download/123 an external file uses download_url/123.

Uses the default download limits set in Store > Config > Products > File download settings but can be overwritten at the product level.

Project page

https://www.drupal.org/sandbox/jlain/2746571

Git clone

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/jlain/2746571.git
ubercart_external_download

Comments

jlain created an issue. See original summary.

Nikhil Banait’s picture

Status: Needs review » Needs work

Hi @jlain,

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.

No duplication
Yes: Does not cause

Master Branch
Yes: Follows the guidelines for master branch.

Licensing
Yes: Follows the licensing requirements.

3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.

README.txt/README.md
No: Does not follow the guidelines for in-project documentation and/or the README Template.

Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.

Secure code
Yes: Meets the security requirements.

Coding style & Drupal API usage
There are some errors reported by automated review tools http://pareview.sh/pareview/httpsgitdrupalorgsandboxjlain2746571git. Some important of them are posted below. Please fix.

FILE: ...r/www/drupal-7-pareview/pareview_temp/uc_external_download.pages.inc
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
164 | WARNING | Variable $http_response_header is undefined.
241 | WARNING | Unused variable $k.
--------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/uc_external_download.module
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
511 | WARNING | Unused variable $default_shippable.
--------------------------------------------------------------------------

FILE: .../www/drupal-7-pareview/pareview_temp/uc_external_download.tokens.inc
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
33 | WARNING | Unused variable $language_code.
37 | WARNING | Unused variable $sanitize.
--------------------------------------------------------------------------

This review uses the Project Application Review Template.

TR’s picture

Status: Needs work » Needs review

Unused variables should be fixed, but they're not a project application blocker ...

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

jlain’s picture

Thanks @Nikhil Banait and @TR.

I've updated readme.txt with the required formatting.

I will leave the unused variables in the code for now. They may have use in the future.

iamfil’s picture

Status: Needs review » Closed (duplicate)

Hello,

Why not submit this as a patch to the existing module?

The Drupal community prefers collaboration over competition to prevent having duplicating modules on drupal.org.

jlain’s picture

Status: Closed (duplicate) » Needs review

This functionality is not needed by all Ubercart users. Only a specific set need this functionality.

A separate module is best for this.

jlain’s picture

This module should be ready to go. Can we get this added?

jlain’s picture

Priority: Normal » Major
3ssom’s picture

Priority: Major » Normal
Status: Needs review » Closed (duplicate)

Hello jlain,

Actually I'm with @iamfil in this one .. why not trying to combining efforts here and patch this to the existing module? if its an option for some users as you say .. so make an option also there.

Thank you

klausi’s picture

Status: Closed (duplicate) » Needs review

Duplication is bad and we should tell applicants, but it is not an application blocker.

jlain’s picture

I asked over at Ubercart and the maintainer also agrees this implementation of serving external files is not a good fit for inclusion.

https://www.drupal.org/node/2811899

3ssom’s picture

Status: Needs review » Reviewed & tested by the community

Hello jlain,

Automated Review

you still have some error shown by @pareview.sh
http://pareview.sh/pareview/httpsgitdrupalorgsandboxjlain2746571git
please fix those .

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[No: Causes] module duplication and/or fragmentation.
Master Branch
[Yes: Follows] the guidelines for master branch.
Licensing
[Yes: Follows / No: Does not follow] the licensing requirements.
3rd party assets/code
[Yes: Follows] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements. / No: List of security issues identified.]
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. Automated shows some errors(ESLint - DrupalPractice).
  2. As mentioned this module is causes duplication which bad and Drupal community prefers joining force over competition but its NOT a blocker and as far as the applicant knows about it I'd just mention this is the project page.
  3. Implements hook_help().
  4. in your hook_schema table created ,, I think but I'm not sure table will be deleted when user uninstall your module so you don't need to use db_delete() .. again you should look this up just to make sure!

I see no blockers here as been mentioned by klausi so I think this is a RTBC :)

Thank you

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Reviewed & tested by the community » Fixed

I will update your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks go the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.