Shopify themes, liquid, logos, and UX
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.
Solved! Go to the solution
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
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
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
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.
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
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025