Problem:
Clients can still continue to create an account by going to the basic login page created by shopify… is there a way the “create account” link can direct them to the "Create WholeSale Account" page?
Question:
How can we redirect the default "create an account" on the Shopify login page to the wholesale sign up form?
Solution:
Open "wholesale-all-in-one.liquid" file from Snippets section and add following script at the end of file.
The default Wholesale registration page handle is "/pages/register" you an change it if you have a different URL for your wholesale registration page.
<script>
var NewSignupPageLink = "/pages/register";
if(document.querySelector('a[href*="/account/register"]') != null){
document.querySelectorAll('a[href*="/account/register"]').forEach(function(element,i){
element.addEventListener("click", function(e){
e.preventDefault();
window.location.href = NewSignupPageLink;
});
});
}
if(window.location.pathname == "/account/register"){
window.location.href = NewSignupPageLink;
}
</script>
Here is screenshot for more detail:
Comments
0 comments
Please sign in to leave a comment.