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 to redirect to a specific page after customer account activation?

Solved

How to redirect to a specific page after customer account activation?

ShowcaseDeckBox
Shopify Partner
4 0 4

How can i change where the customers/activate_account form redirects after submitting passwords in the form? 

 

Current User Flow: 

  • user is sent an account invite email from Admin
  • navigates to the store.account/activate/xxxxx
  • fills in password and confirms password
  • clicks ACTIVATE ACCOUNT button
  • user is directed to their account page i.e. store.com/account   <---------  I would like to change this to redirect to another page on the store such as: store.com/pages/page-name

Screenshot 2024-07-20 at 7.30.29 PM.png

Accepted Solution (1)

Guleria
Shopify Partner
4299 825 1189

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 

- Elevate Your Store with Expert Shopify Services. Email: guleriathakur43@gmail.com - Need a quick fix or a tailored customization? I’ve got you covered.
- Looking to enhance your pages? Try GEMPAGES- a powerful drag & drop page builder.
- Let’s make your store stand out. Get in touch today!
- My Apps: Productify Groups – Smart product grouping made easy.

View solution in original post

Replies 4 (4)

Guleria
Shopify Partner
4299 825 1189

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 

- Elevate Your Store with Expert Shopify Services. Email: guleriathakur43@gmail.com - Need a quick fix or a tailored customization? I’ve got you covered.
- Looking to enhance your pages? Try GEMPAGES- a powerful drag & drop page builder.
- Let’s make your store stand out. Get in touch today!
- My Apps: Productify Groups – Smart product grouping made easy.

tim
Shopify Partner
4812 598 1733

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.

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

ShowcaseDeckBox
Shopify Partner
4 0 4

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!

PaulNewton
Shopify Partner
8031 688 1649

@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