Solved

Change Button Link on Account Creation - Dawn Theme

R_Reno
Shopify Partner
19 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
19 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
9234 1146 1493

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

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
Paranormal story video using AI
R_Reno
Shopify Partner
19 1 2

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

suyash1
Shopify Partner
9234 1146 1493

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

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
Paranormal story video using AI
R_Reno
Shopify Partner
19 1 2

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

R_Reno
Shopify Partner
19 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>