Personalized checkout and custom promotions with Shopify Scripts
In my registration form I am using: {%- form 'create_customer', return_to: routes.cart_url -%}
This redirect to take the user to the cart page after registration. When you register for the first time it works fine. The problem I have is that when someone registers with an email that has already been used, it does not show me the error "This email has already been used", but rather it sends me to the cart page and the user does not register.
How can I validate that part so that the "This email has already been used" message is displayed before doing the redirection?
Also use this method
<input type="hidden" name="return_to" value="/cart"> and the same thing happens.
I appreciate your help
Hi @cferrufino ,
This is Theodore from PageFly - Shopify Page Builder App.
Here's the solution to prevent redirecting before validation in your Shopify registration form:
Use AJAX with Javascript:
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025