Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
How can i change where the customers/activate_account form redirects after submitting passwords in the form?
Current User Flow:
Solved! Go to the solution
This is an accepted solution.
Hello @ShowcaseDeckBox ,
Follow these steps:
1. Go to Online Store -> Theme -> Edit code
2) Edit activate_account.liquid you can find this file under templates.
Add this code at the top of the file
{% if customer %}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
window.location.href = "/your-redirect-url";
});
</script>
{% endif %}
Note: Change /your-redirect-url with the actual page you have.
Thanks
This is an accepted solution.
Hello @ShowcaseDeckBox ,
Follow these steps:
1. Go to Online Store -> Theme -> Edit code
2) Edit activate_account.liquid you can find this file under templates.
Add this code at the top of the file
{% if customer %}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
window.location.href = "/your-redirect-url";
});
</script>
{% endif %}
Note: Change /your-redirect-url with the actual page you have.
Thanks
You should find in your liquid code where the form is rendered, for example,
for Dawn -- https://github.com/Shopify/dawn/blob/main/sections/main-activate-account.liquid#L32 and add a
return_to parameter (https://shopify.dev/docs/api/liquid/tags/form#form-return_to)
{%- assign next_page = routes.root | append: "pages/page_handle" -%}
{%- form 'activate_customer_password', return_to: next_page -%}
In case your theme submits this form with JS, you'd need to modify the JS code, but need to know the theme name to suggest anything.
Thank you all who replied. I found an alternative workflow, therefor I no longer need this answered. Maybe this will help someone else looking. Thanks again!
@ShowcaseDeckBox you can share the details and alternative workfows and mark your own posts as alternate solutions for future merchants.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org