This is all done as a guest user, I am not logged in when I go thru the checkout process and the store setting allows for guest customers.

I have the create an account form on the order checkout page, it asks the user for their password and to confirm it, once they complete the order, it will create an account using their email address they typed in from the previous screen, just to make sure it is being included, I display it on the same page {field:order_email} and it is populated with the correct email.

Then I fill out the rest of the form and click submit, it returns to the same page with no error about the email I used already being registered which is what I expected to see, as the email is being used by a customer who had already been registered but it does not output that.

I then submitted the form and made sure the password and confirm password fields did not match, it returned the error messages as expected using: {error:password} and {error:password_confirm}

Then I went into CheckoutAction.php line 208 and did a var_dump of the form errors and it returned:

array(3) {
    ["order_email"] => string(36) "The email you chose is not available" 
    ["password"] => string(61) "The password you submitted must be at least 5 characters long" 
    ["password_confirm"] => string(53) "The Password field does not match the Password field."

It returns the error but I do not know what I am doing wrong.

This just shows the opening checkout tag, the part of the form that a user can select the checkout ({field:register_member}) to create a new account.

    error_delimiters='<small class="error">|</small>'
    <div class="row">
        <div class="large-12 columns {if error:order_email}error{/if}">
            <label class="check">{field:register_member} Create An Account? howdy</label>
    <div class="row">
        <div class="large-6 columns {if error:password}error{/if}">
            <label>Set your password</label>
        <div class="large-6 columns {if error:password_confirm}error{/if}">
            <label>Type your password again</label>

It works fine if the order email I supplied is not of an existing registered user but I expect it to return an error when the email is already registered.

UPDATE: I removed error_handling="inline" from the checkout opening tag and it displays as expected now, but I need to use error_handling="inline"

I read in the docs:

you should try is removing the error_handling="inline" parameter from your template, as often this is caused by validation errors which you have forgotten to display error messages for.

The template I have the checkout form tag on contains the create account form (password, password_confirm fields and error messages as you can see above in the code example) and it also creates fields for the customer to enter their payment information. We use stripe for payment and have js code to validate that, so that does not have any {error:field_name} tags near it. We need it use inline error handling.

  • For the time being, I checked it on the fly and stops the form from submitting if the json comes back as true, alerting the customer the email already being registered.
    – Brad
    Dec 9, 2015 at 18:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.