Change Button Link on Account Creation - Dawn Theme

Solved

Change Button Link on Account Creation - Dawn Theme

R_Reno
Shopify Partner
20 1 2

Hello!  I'm looking to change the HREF of the "Create" button on the Account Registration page.  It currently links to the home page, but I am not able to locate the script that sets the HREF.  Any help is appreciated!

Accepted Solution (1)

R_Reno
Shopify Partner
20 1 2

This is an accepted solution.

For those wondering, I found a solution that works.

 

Open theme.liquid.  Just above the </HEAD>, place this script:

 

<script> 
document.addEventListener('DOMContentLoaded', function() { 
  var REDIRECT_PATH = '/pages/YOURPAGELINKHERE'; 

  var selector = '#create_customer, #customer_login', 
    $signForm = document.querySelectorAll(selector)[0]; 

  if ($signForm) { 
    $redirect = document.createElement('input'); 
    $redirect.setAttribute('name', 'return_to'); 
    $redirect.setAttribute('type', 'hidden'); 
    $redirect.value = REDIRECT_PATH; 
    $signForm.appendChild($redirect); 
  } 
},false); 
</script>

View solution in original post

Replies 5 (5)

suyash1
Shopify Partner
10715 1323 1699

@R_Reno - open registration page in customize settings and check if you have any option to change link

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
R_Reno
Shopify Partner
20 1 2

There is no option to change anything on the "registration section" except the padding.

suyash1
Shopify Partner
10715 1323 1699

@R_Reno - check theme code files for this account page and check if you have any link option there

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
R_Reno
Shopify Partner
20 1 2

There is not.  It will be in the .js or .liquid.  I need help locating it.

R_Reno
Shopify Partner
20 1 2

This is an accepted solution.

For those wondering, I found a solution that works.

 

Open theme.liquid.  Just above the </HEAD>, place this script:

 

<script> 
document.addEventListener('DOMContentLoaded', function() { 
  var REDIRECT_PATH = '/pages/YOURPAGELINKHERE'; 

  var selector = '#create_customer, #customer_login', 
    $signForm = document.querySelectorAll(selector)[0]; 

  if ($signForm) { 
    $redirect = document.createElement('input'); 
    $redirect.setAttribute('name', 'return_to'); 
    $redirect.setAttribute('type', 'hidden'); 
    $redirect.value = REDIRECT_PATH; 
    $signForm.appendChild($redirect); 
  } 
},false); 
</script>