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 Expert
3270 235 1183

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.

View solution in original post

Replies 2 (2)

tim
Shopify Expert
3270 235 1183

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.
VeronicaZoo
Visitor
3 0 0

That worked perfectly! Thank you so much 😃