Solved

Redirect to specific page after account confirmation email

NickMercy
Shopify Partner
10 0 0

Hi there,

 

i have this link in my account confirmation to activate my account.

 

<a href="{{ customer.account_activation_url }}"
after the account gets activated i want it to redirect to the home page. How do I do this?

 

Thank you.

Accepted Solution (1)
Dawood_Mirza_
Explorer
113 16 25

This is an accepted solution.

If it didn't work for you, try this instead
https://community.shopify.com/c/shopify-discussions/how-to-redirect-to-collection-page-after-account... 

change the redirection URL to your store URL

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.

View solution in original post

Replies 5 (5)

Dawood_Mirza_
Explorer
113 16 25

Hi @NickMercy,

Just to confirm, you added the code under Settings > Notifications > "Customer account invite".

Is that correct?

Knowing this helps me better assist you with your inquiry.

Feel free to ask any further questions you have about this setting or anything else related to Shopify.

Best regards,

Dawood Mirza

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.
NickMercy
Shopify Partner
10 0 0

Hi @Dawood_Mirza_ , yes it us under there.

Dawood_Mirza_
Explorer
113 16 25

Great,
There only replace the code with

 

{% if customer %}
  <p>Click the link below to activate your account:</p>
  <a href="{{ customer.account_activation_url }}" id="activation-link">Activate your account</a>
  <script>
    document.getElementById('activation-link').addEventListener('click', function() {
      setTimeout(function() {
        window.location.href = "{{ shop.url }}";
      }, 5000); // Redirect to the home page after 5 seconds adjust accordingly
    });
  </script>
{% endif %}


If you found it helpful, 
Do like the post and Mark it as a solution 🙂

BR 

Dawood Mirza

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.
NickMercy
Shopify Partner
10 0 0

Hi there,

      {% if customer %}
  <a href="{{ customer.account_activation_url }}" id="activation-link" target="_blank" style="background-color: #7e287f; color: white; padding: 14px 25px; text-align: center; text-decoration: none; display: inline-block; border-radius:8px; font-weight:600; margin-top:15px; margin-bottom:15px;">Activate your account</a>
  <script>
    document.getElementById('activation-link').addEventListener('click', function() {
      setTimeout(function() {
        window.location.href = "{{ shop.url }}";
      }, 1000); // Redirect to the home page after 5 seconds adjust accordingly
    });
  </script>
{% endif %}

it does not seem to be working for me. Any ideas why? 

thanks for the help.

Dawood_Mirza_
Explorer
113 16 25

This is an accepted solution.

If it didn't work for you, try this instead
https://community.shopify.com/c/shopify-discussions/how-to-redirect-to-collection-page-after-account... 

change the redirection URL to your store URL

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.