Is there any way to add a successful message to password reset from

Highlighted
Tourist
8 0 1

I noticed a smiliar post from several years ago; I was wondering, if there was an easy way to do this inside the theme?

 

Specifically,

Once a user clicks the reset password link, and enters their email address, our theme directs back to the login screen.  Was wondering if there was a way to detect a successful password reset request submission, so we can show a message.

 

Thanks for any help!!

John

1 Like
Highlighted
New Member
1 0 0

Hi John, did you ever figure this out?

Currently my password reset redirects to a Shopify checkout "Information" tab (maybe only if there's items in the cart?) which is very bizarre.

0 Likes
Highlighted
Tourist
8 0 1

Hey!

It's been quite awhile since I was in that project, but luckily I retained locally some of the code.  Looks like what we did was have the message hidden in a div, and then using timber.js, leverage the timber.resetPasswordSuccess hook.  Below is a rough guide - my apologies - its been so long, I can't remember where I found the exact solution

/*Assuming somehere on the login/password reset form there's a 
<div id=elementIdHere>Thanks! We've Sent you an Email</div>
*/

//you'd do somethign like this
timber.resetPasswordSucess = function(){
   //do something here
   $("#elementIdHere").show();
}

//THEN somehwere in the theme.liquid file theres a : //
 <script>
    {% if resetPassword %}
      $(function() {
        timber.resetPasswordSuccess();
      });
    {% endif %}
  </script>

0 Likes