Move new account landing page

Solved

Move new account landing page

SeanPatrickH
Shopify Partner
3 0 0

Is there a way for me when a new customer creates and account to go to a different page other that the shipping page? 

 

I am trying to use an app for wishlist but if they dont have an account it wants one created, problem is when they create it, it takes them to shipping info. That is not acceptable. I want them to go back to item or to the general wishlist.

Accepted Solution (1)

SomeUsernameHe
Shopify Partner
495 54 99

This is an accepted solution.

You can try placing the following script before the closing </body> tag in theme.liquid:

<script> 
   (function() { 
     var REDIRECT_PATH = '/checkout'; 
   
     var selector = '#create_customer, form[action$="/account"][method="post"]', 
         $form = document.querySelectorAll(selector)[0]; 
   
     if ($form) { 
       $redirect = document.createElement('input'); 
       $redirect.setAttribute('name', 'return_to'); 
       $redirect.setAttribute('type', 'hidden'); 
       $redirect.value = REDIRECT_PATH; 
       $form.appendChild($redirect); 
     } 
   })(); 
 </script> 

Just replace the REDIRECT_PATH with the URL  you would like people to be redirected to when they sign up with a new account. 

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee

View solution in original post

Replies 2 (2)

SomeUsernameHe
Shopify Partner
495 54 99

This is an accepted solution.

You can try placing the following script before the closing </body> tag in theme.liquid:

<script> 
   (function() { 
     var REDIRECT_PATH = '/checkout'; 
   
     var selector = '#create_customer, form[action$="/account"][method="post"]', 
         $form = document.querySelectorAll(selector)[0]; 
   
     if ($form) { 
       $redirect = document.createElement('input'); 
       $redirect.setAttribute('name', 'return_to'); 
       $redirect.setAttribute('type', 'hidden'); 
       $redirect.value = REDIRECT_PATH; 
       $form.appendChild($redirect); 
     } 
   })(); 
 </script> 

Just replace the REDIRECT_PATH with the URL  you would like people to be redirected to when they sign up with a new account. 

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee
SeanPatrickH
Shopify Partner
3 0 0

Thanks so much 🙏🏽. Worked great!