The Commerce Cart Multiple module provides functions and UI for visitors to manage multiple shopping carts in Drupal Commerce.

While Drupal Commerce does not inherently restrict users to more than one cart, there are no existing modules to support handling multiple carts. See https://www.drupal.org/node/1350342 for a discussion.

Project page: https://www.drupal.org/sandbox/spacetaxi/2702951

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/spacetaxi/2702951.git commerce_cart_multiple

Manual reviews of other projects

https://www.drupal.org/node/2592703#comment-11062189
https://www.drupal.org/node/2654480#comment-11062125
https://www.drupal.org/node/2501207#comment-11061937

Comments

spacetaxi created an issue. See original summary.

spacetaxi’s picture

Issue summary: View changes
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.

spacetaxi’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

http://pareview.sh/pareview/httpgitdrupalorgsandboxspacetaxi2702951git shows errors for missing comments, etc. on commerce_cart_multiple.module and includes/views/commerce_cart_multiple.views.inc, but these seem to be false positives. Also, please note that view handler classes don't follow typical class recommendations, so there are false positives with these as well.

Also, there is a security notice, but I'm not sure why it is an issue.

FILE: ...var/www/drupal-7-pareview/pareview_temp/commerce_cart_multiple.module
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
179 | ERROR | Menu callback argument $order returned from
| | commerce_cart_multiple_cart_view
---------------------------------------------------------------------------
mmowers’s picture

Hi @spacetaxi. Here's a manual code review, based on the Project Application Review Template. Note that I have not installed and tested the module, and have never used Drupal Commerce, so I will keep this in Needs Review state.

Recommendations/Questions are in bold italics

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation,at least I don't think so. However, this issue indicates that Drupal Commerce already supports multiple carts. Could you add some specifics to project page detailing the specific unique functionality of this module?
Master Branch
[Yes: Follows] the guidelines for master branch, with 7.x-1.x as the branch name and the correct git clone command.
Licensing
[Yes: Follows] the licensing requirements, as sandbox project uses GNU GPL v2, and there are no other licenses cited.
3rd party assets/code
[Yes: Follows] the guidelines for 3rd party assets/code, as none are included.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template, with all the required sections and information in README.txt.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets] the security requirements There are no direct writes to the db, db queries are made through abstractions like EntityFieldQuery and Drupal's Database API, and standard handling of user input.
Coding style & Drupal API usage
[List of identified issues in no particular order]
  • I think most of those automated errors are real, though they are simple formatting issues (see guidelines) for the most part. For example, hooks should not have @param or @return comments, and first line should just be "Implements hook_...". Non-hook functions should have specific formatting for @param and @return comments, etc....

No application blockers as far as I can see. Again, I have not installed and tested, so I am leaving this in a Needs Review state.

klausi’s picture

A Code review is enough, testing a module is optional. If you are confident that the applicant knows what they are doing and there are no security issues then you should set this to RTBC.

spacetaxi’s picture

Issue summary: View changes

Thanks @mmowers for the insight on the pareview.sh errors. After some struggle, these are fixed. Pareview.sh still reports issues for the views classes, but these aren't applicable.

Regarding that post you reference, https://www.drupal.org/node/1350342, if you read further down the discussion it is revealed that while Drupal Commerce can support multiple carts, there is no existing user interface to support this. This module provides the UI as well as adjusts the logic to determine which cart is active. I've updated this issue summary and the project page. Thanks for catching this, hopefully it is explained better now.

mmowers’s picture

Status: Needs review » Reviewed & tested by the community

If all those errors are false positives, all looks good to me. Moving to RTBC

andriuzss’s picture

Hello spacetaxi,

I have few small inputs for your module:

commerce_cart_multiple.module line 228 - empty line, not needed.

commerce_cart_multiple.module line 85 - else statement is not needed, you could just return FALSE at the end of function.

commerce_cart_multiple.module line 132 - global $user variable is used just in else statement, perhaps it's better if you could move it there.

Everything else looks really good.

spacetaxi’s picture

Hi @andriuzss, Thank you very much for your review. I've implemented your suggestions.

ashwinsh’s picture

Automated Review

Pareview.sh has found some minor errors. See http://pareview.sh/pareview/httpsgitdrupalorgsandboxspacetaxi2702951git

Thanks,

spacetaxi’s picture

Changed line 134 in commerce_cart_multiple.module from tab indention to 4 spaces.

mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution! Congratulations, you are now a vetted Git user. You can promote this to a full project.

When you create new projects (typically as a sandbox to start) you can then promote them to 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.

Status: Fixed » Closed (fixed)

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