Login/Registration form on custom page redirects to default customers/* page with form error

Highlighted
New Member
4 0 0

I have embedded the login and register forms into a product page in order that the user is forced to signup/login before they purchase my membership product (which tags their account, thus necessitating them needing to be logged in)

 

I have successfully tested this for the cases when you fill in the forms correctly or login successfully. Using the following snip-its for the registration 

<input type="hidden" name="return_to" value="{{ canonical_url }}" />

 and login forms

<input type="hidden" name="checkout_url" value="{{ canonical_url }}" />

When the customer logs in or registers they will stay on the same product page where they registered or logged in. 

 

The problem

If, while filling out the registration or logging in, you make a mistake (wrong password, missing fields) you are sent to the customers/register or customers/login page where the error is displayed.

 

This is not the behavior I am looking for. I would like the errors to be displayed in the same embedded form area where they initially entered the wrong data. How can I make this work?

0 Likes
Highlighted
New Member
1 0 0

Hi @SerajD Did you find a solution to this?

Cheers

0 Likes
Highlighted
Shopify Expert
3913 559 940

Hi @SerajD 

For that you need to use ajax function.

you can call login page by sending details in ajax and you get whole login page as response in order to success or error.

so you have to find error div in html and show error on popup.

But in this case if captcha generate then you must go to login page it cant work with popup.

May be it help.

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
4 0 0

Thanks for the info.

0 Likes
Highlighted
New Member
6 0 0

Hi,

I saw your post about a redirect to a generic shopify log in page if the user enters wrong password.

Did you get this issue figured out?

I have the same issue - I have  pop up window for Log In / Sign up and if the user enters the wrong user or pass they are taken to shopify generic log in page. I want to stop this and have the user stay in the same custom log in popup window.

Any suggestions much appreciated.

Thank you!

0 Likes