Onepage Checkout Registration Redirects to Cart – Fix 404 Error

404ajaxcartce-1.8.1.0onepage-checkout

When a user proceeds to the checkout page and is not logged-in, it is presented with the form to login or create an account. "Allow guest checkout" is set to no. At this point, the user can log in just fine, but when the "register" button is clicked, the account creation form loads for a second but then the page redirects to the cart. No error messages displayed, no empty cart.

I looked at the browser console and found out that the AJAX call to the checkout/onepage/saveMethod action is failing with a "404 (Not Found)". If I the user is logged in though, the same action is available. I have searched a lot about this and everyone keeps saying that it is fixed by setting "Allow Guest Checkout" to yes, but that is not an option in this case. Someone said here that it should be fixed

by setting “Require Customer To Be Logged In To Checkout” to No

but that also did not work.

Has anyone run into this before?

TL;DR:
Allow Guest Checkout is set to No.
Customer registration page in Chekout loads and then immediately redirects to the cart. Customer can login succesfully or register outside of the chekout and then place an order. Why is the registration form being redirected if it already loaded? Why is the action checkout/onepage/saveMethod returning a 404 in the ajax call?

Best Answer

I had the same problem with this, and found it only to be a problem when "Login and Pay with Amazon" was enabled. When I turned it off, I was able to click the 'Register' button and not get redirected back to the cart.

However, since I really need the Amazon Login and Pay option, I was able to change a setting in System -> Sales -> Checkout "Require Customer To Be Logged In To Checkout" to "No".

After that, I was able to use the Amazon service AND allow a customer to click "Register" on the first part of the checkout process.

Hope this helps!