Features:
This modules integrates with Commerce Shipping 7.x-2.x and USPS Web Tools to provide shipping quotes for Drupal Commerce websites who wish to use USPS as a shipping method.
History and Differnce From Commerce Shipping USPS:
This project is a fork, rename and upgrade of the original Commerce Shipping USPS that has now had its development suspended: http://drupal.org/project/commerce_shipping_usps. It was decided that the Drupal Commerce Shipping modules should be named "Commerce Method" instead of "Commerce Shipping Method" as a convention: http://drupal.org/node/1348088. Since we could not rename the module, we (the commerce shipping usps maintainers) cloned the original and created a new module so that the attribution was not removed from the original project. Also, the original commerce shipping usps was build on the Commerce Shipping 7.x-1.x which has been upgraded to Commerce Shipping 7.x-2.x. It is stated that any new shipping module development should be developed on the Commerce Shipping 7.x-2.x API. This fork allows Commerce USPS to work in conjunction with other shipping methods that use Commerce Shipping 7.x-2.x including Commerce UPS.
Project Link:
http://drupal.org/sandbox/andyg5000/1526238
Git URL:
git.drupal.org:sandbox/andyg5000/1526238.git
Drupal Version:
Drupal 7
Reviews of other projects
http://drupal.org/node/1524330#comment-5879492
http://drupal.org/node/1483532#comment-5879326
http://drupal.org/node/1505236#comment-5879376
http://drupal.org/node/1246104#comment-5908998
http://drupal.org/node/1442252#comment-5940176
http://drupal.org/node/1237070#comment-5944266
Comments
Comment #1
andyg5000Added PAReview: review bonus
Comment #2
chhavik commentedThe following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226
remotes/origin/7.x-1.x-dev
Review of the 7.x-1.x branch: Nice work on coding standards, just a minor warning. See http://ventral.org/pareview/httpgitdrupalorgsandboxandyg50001526238git.
Manual review :-
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #3
andyg5000I've completed all of the suggestions with the exception of one. The minor warning from PAReview.sh involves the XML requests that are made to USPS. Their API specifies the use of "< RateV4Request >" which is capital. So the inconsistency with XML standards lies in their court. I'll attempt to do some reviews later tonight. Thanks!
Comment #4
andyg5000More reviews of other projects:
http://drupal.org/node/1246104#comment-5908998
http://drupal.org/node/1442252#comment-5940176
http://drupal.org/node/1237070#comment-5944266
Comment #5
scarer commentedHi there,
Just had a look at your code. I haven't installed and tested it or run it through ventral yet.
I noticed in this function on line 196 in your main module file:
function commerce_usps_trim_service($service_name) {
return str_replace("<sup>®</sup>", "", $service_name);
}
You use double quote instead of single quotes. Was there a reason for this? The double quote slows PHP down a little as it has to parse the strings in double quotes - unless you intended this? The str_replace function should work using single quotes.
In the commerce_usps.xml.inc file, with the values passed to $field_name and shipping_profile, are these values sanitized? (i.e. http://drupal.org/node/28984) Also are the values where you are performing the preg_replace and str_replace in the module file also sanitized? No clue as to what the USPS service code has in it that might do these things.
About to install it on a test instance and see what happens.
Cheers
Comment #6
andyg5000Hey @scarer,
I've swapped the quotes and comitted the change. Thanks for the pickup. I'll look at sanitizing the returns from USPS.
Thanks,
Andy
Comment #7
andyg5000The strings that are being ran through preg_replace are set in the module so there is no need to sanatize them. As for the strings that are returned through USPS api, they are expected strings that do not change. We have followed the basic flow of the Commerce UPS module and they are handling their values the same way. Let me know if you find anything else and thanks for reviewing!
Comment #7.0
andyg5000Updated reviews of other projects
Comment #8
scarer commentedNo problem. Just trying to get the module working on a Drupal 7 instance. I haven't used the commerce module much before. It seemed to install OK. A lot of dependencies. I haven't experienced any errors as yet.
Comment #9
klausiReview of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
manual review:
require_once dirname(__FILE__) . '/mymodule.inc';But that are just minor issues, otherwise this looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #10
patrickd commentedMaybe you could also add the configuration page as "configure = " key to your info.
Thanks for your contribution and welcome to the community of project contributors on drupal.org!
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
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.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #11.0
(not verified) commentedAdded more reviews list to the main issue description