Module adds Cost field to products and line items to calculate order profits and use it in different reports.
It also replaces default commerce line item manager to let editing of line item cost in admin area and see margins and order total changing in realtime.
Two fields are added to order instances to collect expenses and recalculate total order profit on order entity save.
Project Page:
https://www.drupal.org/sandbox/potop/2319043
Git Clone:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/potop/2319043.git
Reviews of other projects:
https://www.drupal.org/node/2322009#comment-9068127
https://www.drupal.org/node/2316793#comment-9070651
https://www.drupal.org/node/2187531#comment-9070903
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | admin_modules_list_confirm_issue.png | 5.44 KB | pushpinderchauhan |
Comments
Comment #1
potop commentedComment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxpotop2319043git
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.
Comment #3
potop commentedComment #4
potop commentedCleaned up code regarding pareview results with exception for view related files naming and standard hooks parameters comments
Comment #5
potop commentedComment #6
pushpinderchauhan commentedCorrected Git Clone URL.
Comment #7
pushpinderchauhan commented@potop, thanks to you for contributing.
I tried to install this module on my machine and got following issue.
FieldException: Attempt to create a field of unknown type <em class="placeholder">commerce_price</em>. in field_create_field() (line 110Fix this issue to get it review further.
Comment #8
potop commented@er.pushpinderrana, thank you for your cooperation!
I implemented simple testcase for base calculation function of my module. Now it passes and ensures that module installation process should have no issues.
Comment #9
PA robot commentedProject 1: https://www.drupal.org/node/2322511
Project 2: https://www.drupal.org/node/2319065
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #10
potop commentedI prefer this module to go through review process, not the other one.
Comment #11
potop commentedComment #12
potop commentedone more project review added
Comment #13
potop commentedone more project review
Comment #14
mpdonadioAssigning to myself for next review.
Comment #15
mpdonadioAutomated Review
Review of the 7.x-1.x branch (commit 8b307fa):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
These are false positives b/c Views naming conventions. You can safely ignore them.
Manual Review
Could be expanded some.
(*) In commerce_costs_profits_field_widget_form_alter(), lines 91-92, you are outputting the currency symbol unsanitized. This should all be using commerce_currency_format().
(*) You are using .html() to add to the page, but it looks like everything is plain text, so you can use .text(). Using .html() also makes these XSS prone.
(+) JS should use the context and settings objets that are passed in.
Not really sure if restrict=TRUE is needed in your permissions. This is more for security / dangerous admin functions, not sensitive data. A site may want non-admins (eg, accountants) to be able to see this.
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #16
potop commented@mpdonadio, Thank you for your review.
I fixed both (*) and (+) issues you've found.
Comment #17
mpdonadioI read `git diff 8b307fa..HEAD`, and my blocking issues have beed addressed.
(+) commerce_costs_profits_field_widget_form_alter uses the [] syntax for making arrays. This was introduced in PHP 5.4. Either add this dependency to the .info, or use the array() syntax.
Not seeing anything to prevent RTBC here, but it will need another set of eyes from an admin in case I missed anything.
Comment #18
potop commented@mpdonadio, Thank you again.
5.4 array syntax's been removed.
Comment #19
mpdonadioManual review of 7.x-1.x (30d9e3e)
You still have a few places where you aren't using the behavior context in the JS (looks like it may just be in calculateOrderTotal).
This has been RTBC for a while w/o objection, and I didn't see any blocking issues when I read through again.
Comment #20
mpdonadioThanks for your contribution, potop!
I updated 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!
Thanks, 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 to the dedicated reviewer(s) as well.
Comment #21
potop commented@mpdonadio Thank you again for what you do for the community!