How to go to "create an account" page instead of "login" page on checkout

Solved

How to go to "create an account" page instead of "login" page on checkout

VeronicaZoo
Visitor
3 0 0

Hi there! I'm using debut theme and customer accounts are mandatory for checkout. I'd like customers to be redirected to the Create An Account / Registration page instead of the Login page when they click the "checkout" button. Looking for advice on how to achieve this.

 

My website is www.juli.com.au

 

Thanks in advance!

Accepted Solution (1)

tim
Shopify Partner
4272 488 1572

This is an accepted solution.

One way to do it is by modifying your layout/theme.liquid as follows:

 

Add this code right after the <head> tag. 

<script> 
  if (location.href.includes('/login?checkout')) {
    location.href=location.href.replace('/login', '/register');
  }
</script>

 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 2 (2)

tim
Shopify Partner
4272 488 1572

This is an accepted solution.

One way to do it is by modifying your layout/theme.liquid as follows:

 

Add this code right after the <head> tag. 

<script> 
  if (location.href.includes('/login?checkout')) {
    location.href=location.href.replace('/login', '/register');
  }
</script>

 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
VeronicaZoo
Visitor
3 0 0

That worked perfectly! Thank you so much 😃