The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Recurring Checkout Errors: Billing City, New Customer Password, etc.

LeafcutterLeafcutter Member
in Bugs & Feature Requests edited August 2016
We're seeing a few recurring checkout errors showing in our error log for, none of which are discussed here:

The three most frequent errors we're seeing are:

1. new_customer_password: Error: Please enter a password.
2. billing_city: Error: City cannot be blank.
3. There was an error processing your payment: (10728 Shipping Address City Empty) The field Shipping Address City is required

I believe all of these should be validated on the client side, correct? In which case, how are they getting through to produce server-side processing errors? Can you advise a fix? Thanks!
  • fc_adamfc_adam FoxyCart Team

    Those should be caught by the client-side validations, you're right. We'll dig into this and see if we can spot how they're getting through, and as needed, work on fixes for them too. Thanks for bringing these to our attention, and sorry for the inconvenience for you and your customers
  • fc_adamfc_adam FoxyCart Team
    edited August 2016

    One possibility for the address based errors is that it's related to the "copy to billing" functionality you have on the checkout. I couldn't replicate it myself - but your store does have a fairly high rate of these errors, and we don't generally see these types of errors with other stores.

    The only thing is we can't really tell from the logs whether a customer did use the "copy to billing" checkbox or not.

    In terms of what could be happening for the address based errors, I believe something related to the postal code lookup is failing to execute correctly. This could happen if the JSON object gets out of sync with the page itself and so the page ends up in a weird state.

    One additional thing you could add to your copy to billing logic is to force the postal code address lookup to happen after the details are entered. You can do that by triggering the input event on the respective postcode field like $("#billing_postal_code").trigger("input.fc.fc-postal-code");. If you do that after you render the address block, that should ensure the postcode lookup happens and returns the city/state fields.

    [edit] I see you're also setting the email in some situations if it comes from your server. Is there any way to tell if the errors that show the new_customer_password error were in instances where that email address has come from your server and as such was set through your javascript?
  • Thanks @fc_adam -- Just now getting around to looking into this more.

    I do know that the "copy to billing" functionality is imperfect in that it doesn't "copy" exactly. It seems to ignore the shipping city, and instead do a new zip code lookup for billing, based on the shipping zip. If there's only one city in that zip, then it works just fine. But when there's two or more city matches for the zip, it defaults to the first city listed alphabetically. This creates a problem because customers are expecting it to "copy" everything. They often don't realize they have to once again use the drop-down and select the proper billing city. Could this be causing the error?

    Either way, is there a way to make "copy to billing" a true exact copy that doesn't force the customer to take an extra step and use the drop-down after the zip lookup happens? They've already done this to select the shipping city, so the form already knows the user's intent.

    A quick spot check shows that the billing error is happening regardless of whether we set any information from our server:
    billing_city: Error: City cannot be blank.
    billing_region: Error: State cannot be blank.

    A quick spot check shows that the password error only seems to happen when we set the email address (among other info) from our server:
    new_customer_password: Error: Please enter a password.

    Let me know if you have further thoughts re best fixed for both errors.

    Thanks, -Devin

  • fc_adamfc_adam FoxyCart Team

    You could try disabling the postal code lookup option, and see if that improves the flow for you. Alternatively you could also try copying the JSON values for the city_option_selected and city_options as part of your copy which should prepopulate the values for you.

    For the email, you will need to trigger the change event to ensure that things update as they should. For example: jQuery("#customer_email").val("").trigger("change");
Sign In or Register to comment.