Thanks in advance for your review!!

This is a D7 module

This module integrates the commerce_file module with the commerce_product_bundle module.

Currently, you can add products containing commerce_file fields into bundles, but when a customer purchases the bundle the files will not be made available. Similarly, any issued file licences will not be revoked if the order is canceled.

This module adds that functionality by exposing the files to the bundle line items and exposing rules and actions that issue/revoke file licences for bundled files.

How to use:

1) install and enable commerce_file_bundle in the usual way.
2) check that any commerce_file and commece_product_bundle configurations are set.
3) since the rules provided in this module duplicate the corresponding rules provided by commerce_file, you may want to disable those rules provided by commerce_file to prevent duplicate executions.

http://drupal.org/sandbox/tbenice/1690422
http://drupalcode.org/sandbox/tbenice/1690422.git

CommentFileSizeAuthor
#8 ventral_org_report.pdf62.69 KBdas-peter

Comments

tbenice’s picture

Status: Active » Needs review
sanchi.girotra’s picture

Please review your project using Coder Module and see the automated ventral review report here.
It is strongly recommended that you take part in the review bonus program, otherwise you will not get reviews of your code for several weeks. So make sure to review three project applications before posting your own.

drebroff’s picture

Assigned: Unassigned » drebroff

I will review code and functionality in several days. Assign.

patrickd’s picture

Assigned: drebroff » Unassigned

in several days? - assign if you do it now. don't block earlier reviews....

mitchell’s picture

Status: Needs review » Needs work
Issue tags: +PAReview: Commerce

Thanks for contributing this project, tbenice.

I'm not incredibly familiar with Commerce, but I glanced over your code, and it seems well-ordered. I'm looking forward to seeing what more experienced Commerce users thinks, so I added Commerce's review tag.

* The only things that seemed worth fixing are linked in #2 with the ventral review. Hence the 'needs work' change.
* Would it be possible and/or more desirable to integrate this directly in commerce_file or commerce_product_bundle?
* If you could provide a feature package that demonstrates this functionality, I'd be happy to test it out.

tbenice’s picture

Thanks for the support everyone...I'm planning on addressing the review by early next week.

tbenice’s picture

Status: Needs work » Needs review

Committed the pareview items. Thanks again for your attention and support!

As for the other two comments:
* Would it be possible and/or more desirable to integrate this directly in commerce_file or commerce_product_bundle?

Not sure, but in my opinion it's nice to have a separate module. We could add the bundle support into commerce_file, but then we'd just have to check for existence of the bundle module anyways.

* If you could provide a feature package that demonstrates this functionality, I'd be happy to test it out.

I could do that but it wouldn't show much. The module's pretty simple...just turn it on and it goes as long as commerce_file and commerce_product_bundle are config'd and products are created correctly.

das-peter’s picture

Status: Needs review » Needs work
StatusFileSize
new62.69 KB

Thank you very much for contributing - I hope I'm able to support your effort with this review :)

I'm not to familiar with the commerce_file module an thus can't provide any statement if it would be applicable to include this functionality there.
I'd suggest to join the commerce IRC channel #drupal-commerce and ask there.

However, I found some other points that should be taken care before this can become a full project.
The automated tests on ventral.org came up with some notices (or see the attached pdf).
Further I'd suggest to move the definition of the rules actions as well as the callbacks into a dedicated file as rules api documentation says: hook_rules_action_info: This hook is required in order to add a new rules action. It should be placed into the file MODULENAME.rules.inc, which gets automatically included when the hook is invoked.
And then there's the implementation of hook_enable - this hook should be implemented in the module's .install file.
This also brings up the question what happens if the module is disabled / uninstalled. Are there no necessary cleanup actions?

That's all I, no biggies :)

das-peter’s picture

@tbenice I just talked with Bojan, he told me he will take a look into this. I just sent him the link to this issue.

tbenice’s picture

Status: Needs work » Needs review

Addressed issues in #8, and patched issue http://drupal.org/node/1741576#comment-6371348.

tested and working great.

Thanks again for continued support!

frankye’s picture

Status: Needs review » Needs work

Hello @tbenice
You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch.

tbenice’s picture

Status: Needs work » Needs review

OK, i created branch 7.x-1.x which will be used in future. Thanks.

Any chance we can move to a full project?

Thanks again for the continued support!

stborchert’s picture

Status: Needs review » Needs work

You still need to fix the issue listed on http://ventral.org/pareview/httpgitdrupalorgsandboxtbenice1690422git:

Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Major coding standards / best practice issues
An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.

You can find the results of the automated report at http://ventral.org/pareview/httpgitdrupalorgsandboxtbenice1690422git.

One additional question: in hook_install() you are calling commerce_file_configure_line_item_type() if module commerce_line_item is enabled. Is there a way to check this later? E.g. if commerce_line_item is installed after your module the function does not seem to be called.

tbenice’s picture

OK, will do on the first request.

As for the second, the commerce_file_configure_line_item_type() is a function called during install by the commerce_file module. It sets up some line item types for the commerce_file.

My module requires commerce_file which requires commerce_line_item. Thus, commerce_line_item cannot be installed after my module.

Thanks!!

-T

tbenice’s picture

Status: Needs work » Needs review

OK, I've resolved all issues from the automated testing, changed the default branch, and removed the master? Ready to flip the switch?

Thanks!!!

Ted

bekirdag’s picture

Only things i like to mention is about the installation and configuration.

Your module depends on these modules, please mention it in your description.

http://drupal.org/project/commerce_product_attributes
http://drupal.org/project/commerce_file
http://drupal.org/project/commerce_product_bundle

Also more description about how to use your module would be great, i know it is the most boring part but necessary.

tbenice’s picture

OK, I added the dependencies and added a bit more in the description. This module is really very small and does not require any configuration beyond what is required to configure the dependencies.

Hoping to get out of sandbox mode! I have plenty of other work to contribute!

Cheers,
Ted

mitchell’s picture

Assigned: Unassigned » mitchell
Status: Needs review » Reviewed & tested by the community

I read through the comments, the project issue queue, and glanced over the code. It appears that the module has reached an acceptable state, the requested changes have been made, and the code is confirmed to work.

Setting to rtbc. For the remaining code improvements, please use the project's issue queue.

mitchell’s picture

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

Thanks for your contribution, tbenice!

I updated your account to let you 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 get involved!

Thanks, also, for your patience with the review process. Thanks to the dedicated reviewers as well.

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

Anonymous’s picture

Issue summary: View changes

indicated drupal version