Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 May 2012 at 18:47 UTC
Updated:
22 Mar 2013 at 23:25 UTC
This module hooks on to Ubercart`s checkout form and provides AJAX callbacks for the postal code fields.
That way the user does not need to fill out the city name.
http://drupal.org/sandbox/bendik/1594840
git clone http://git.drupal.org/sandbox/bendik/1594840.git
Written for Drupal 7.x (Ubercart 3).
Comments
Comment #1
klopsen commentedHi.
Some code clearing needs to be done. More info in here:
http://ventral.org/pareview/httpgitdrupalorgsandboxbendik1594840git
You should also be working in a version specific branch (ie 7.x-1.0), not in master.
Comment #2
bendikrb commentedHi, and thanks for your reply.
I think I have cleaned up everything in the list from pareview now, and checked out the code in branch 7.x.1.x.
Could you please check again?
Best regards,
Bendik
Comment #3
bendikrb commentedComment #4
jleiva commentedHi, manual review
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
Comment #5
patrickd commented@ jleiva
Seems like you missunderstood the sense of the "review bonus" tag, please read https://drupal.org/node/1410826
(btw, Pasting automated reviews into applications is not enough, manual reviews are required.)
Do not paste the full results into the issue, as giant ‘wall-of-wrong’ posts are extremely demotivating to applicants. Rather provide a link or attachment of the results.
As you can still edit and shorten your comment - please replace your text with the proper link
Comment #6
bendikrb commentedHi,
I have now cleaned out my master branch and fixed most of the issues reported by pareview.
As for these three;
Function comment short description must be on a single lineExpected "switch (...) {\n"; found "switch(...) {\n"Expected "foreach (...) {\n"; found "foreach(...) {\n".. I'm not sure how. Can't see what the problem is, really.
Comment #7
jleiva commentedHi bendikrb, looks like you have to add one space after
switchandforeach, and maybe this will help you with the function error http://drupal.org/node/1354#functionsComment #8
bendikrb commentedWow, how did I miss that :P
I have added the spaces, and put a blank line after the function short description.
Thanks again.
Comment #9
bendikrb commentedbump
Comment #10
richthegeek commentedREADME.txt
uc_postalcode.info
uc_postalcode.install
uc_postalcode.module
Comment #11
bendikrb commentedThanks for your review.
README.txt and uc_postalcode.info
Stated the obvious.
uc_postalcode.install
You are absolutely right. I moved the comments to the method comments.
As for the weight altering I used this method after seeing it being used on several other projects.
To be honest I have never seen hook_module_implements_alter before, so that's something I'd look in to.
uc_postalcode.module
Comment #12
sigveio commentedTo mention a couple of issues that will prevent this module installing at this point in time:
In uc_postalcode.info - the dependency on "ubercart" is invalid. This should be changed to for an example uc_cart, an existing core module in the ubercart package.
On line 187 of uc_postalcode.module (branch 7.x-1.x) - you will get a "Parse error: syntax error, unexpected ';'", because you've closed off the parenthesis' for the array, but not the format_string function. It should be:
From the log it seems you accidentally introduced this bug through your last commit.
A less critical issue:
This leads to the progress message of "Receiving shipping quotes...", which might seem a bit illogical when fetching the city. Another issue is that if you type in an invalid postal code, and get the message "Invalid postal code" added as a suffix to the field, then try again with a new postal code... the "Invalid postal code" suffix is not removed while a new query is ran. This leads to a message of "Receiving shipping quotes...Invalid postal code" displaying while it runs... which is potentially confusing to the customer, and somewhat problematic wrt. available space behind the field in most checkout pages.
Apart from that - it looks like a nice and handy module. Thanks for sharing! :)
Comment #13
bendikrb commentedThanks for your review.
I have fixed the syntax error and updated dependencies (I initially only had uc_quote there, as its dependencies will be inherited by my module... see #10).
I don't find the "Receiving shipping quotes" message illogical; changing your city (zipcode) will in most cases lead to a different shipping quote!
I could look in to hiding the field suffix while ajaxing, but I don't think it's that big of a deal really.. :)
Comment #14
sigveio commentedYou are most welcome.
In a web shop that charge for shipping, it might not be that illogical... that is true. But it is becoming increasingly common to offer free shipping these days (and completely hide/remove the shipping-method part of the checkout). In that use-case it'd seem quite odd / out of place imo.
Don't forget that far from everyone shopping online are tech savvy or used to computers / online shopping. You'd be surprised how little it can take to go from the mindset of "Intending to complete the checkout" to...
As much as 1 out of every 3 shoppers drop out during checkout, on average, according to the statistics... and the details do definitely matter when it comes to the overall impression / the customers sense of security. I'm not going to call the customers "stupid", but I wouldn't leave anything to chance when designing a checkout-process. ;)
How about making the message configurable, so that it can be adapted to the sites specific needs? Seems like the sensible (and not too hard to implement) solution, so long as you also keep it translatable for multi-lang support. You could offer a choice between "Receiving shipping quotes" and for an example "Looking up city...", or a text field for entering your own message. :)
Thanks. I think that'd be a good addition, as it'd come across as more professional / polished to the customer.
Comment #15
bendikrb commentedHi hoesi, and thanks again.
My point is this; I'm not the one binding an event to the zip code field, nor displaying the "Receiving shipping quotes" message - this is core ubercart behaviour.
So whether this message is confusing or not is obviously not in the scope of this module!
Comment #16
sigveio commentedI disagree; your module adds functionality outside what Ubercart provides by default, completely altering the premise of the original message. It is no longer merely used in combination with the shipping pane - it is triggered upon filling in a postal code, and appended as a suffix to that field, regardless of whether the shipping pane is present or not. Hence it would be completely within reason to replace the message and adapt the behaviour to fit the new context. ;-)
If you'd like to keep compatibility with whatever the Ubercart project sets the "standard message" to in the future, you could provide this by default but offer an option to override it through this module settings. Tick a box to replace it with a translatable "Looking up city..." for an example. The default behaviour is fine for stores who charge for shipping, while the override would be a lot more suitable for stores offering free shipping (or have no physical shipping at all). These are after all pretty common these days.
I'm just trying to suggest an improvement that'd make your module suitable for a broder set of online stores. It'd enable it to cover more than one use case, and hopefully gain a larger user base in time. Whether you feel it's worth listening to is obviously completely up to you. I appreciate the work you've put into the module nonetheless. :)
Comment #17
DanZ commentedYour code contains a few spacing/punctuation standards issues. See http://ventral.org/pareview/httpgitdrupalorgsandboxbendik1594840git.
You appear to be using an awkward method for theming the form elements and configuring the AJAX. The normal way is really quite easy. See the AJAX reference and form reference for details.
Use '#prefix' and '#suffix' to put a form element in a div, not a theme function.
Use '#theme' to theme a form element. It will get called automatically that way.
Your code only works for checkout. There are many other places where Ubercart uses addresses. If your code applied to the uc_address entity/object, it would work in lots of places.
When creating an order, the following errors popped up:
The city did appear. However, it appeared next to the postal code. This is kind of distracting. I'd like to see the city displayed on it's own line, as you normally would on an address form. This might require the combination of a hidden field to store the value and a markup field to display it. You could also just have the city be a normal text field and updating the postal code updates it.
Could the postal code also be used to determine the state or province?
Comment #18
sigveio commentedDid you give up on publishing/maintaining this project, bendikrb?
Comment #19
bendikrb commentedNo I have not given up, I just have a bunch of other stuff on my plate now-a-days.
Comment #20
klausiProject 1: http://drupal.org/node/1606634
Project 2: http://drupal.org/node/1886184
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.
Comment #21
bendikrb commentedPostponed in favour of http://drupal.org/node/1886184
Comment #22
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.