0

I was try to create pop-up for forgotten password. I am able to open pop-up window, but there is whole site, instead of only form - it is because I call link for whole site like this:

<?php echo $this->getForgotPasswordUrl() ?>

Have anybody idea, how to load to pop-up only form? I also try to call template of that form, but I got restriction. So simple I use same call for pop-up here is it:

<a href="#" onclick="getForgotPassUrl('<?php echo $this->getForgotPasswordUrl() ?>')" class="pull-right"><?php echo $this->__('Forgot Your Password?') ?></a>

and here is js:

<script type="text/javascript">// <![CDATA[
function getForgotPassUrl(url) {
renewPassword = new Window({className:'magento',title:'Renew Password',url:url,width:820,height:600,minimizable:false,maximizable:false,showEffectOptions:{duration:0.4},hideEffectOptions:{duration:0.4}});
renewPassword.setZIndex(100);
renewPassword.showCenter(true);
}
// ]]></script>

Now I recognize, that after I confirm resend password, it redirect me to account page, but in this pop-up... best should be close pop-up.

0

To show only the form into the page (without the full layout) you need to set the template for the forgot password page to empty, this can be done thru the following code into your local.xml (inside your theme layout directory):

<customer_account_forgotpassword>
    <reference name="root">
        <action method="setTemplate"><template>page/empty.phtml</template></action>
    </reference>
</customer_account_forgotpassword>

To make the popup close you should add some javascript to the forgot form to submit to the opener window and close the popup, I will have to try it tomorrow on my dev system to see what would work.

1
  • Hi Vladimir, thank you, I do not know why, but add reference in local.xml does not help, but when I change it in customer.xml begin work as expected. I found, that there is also popup.phtml, should not be that used? ...I mean as better alternative to empty page, but as it is work superb, just I have no idea, how to set, that after send button will close window instead load whole page inside popup window. Thank you for your help and if you can check also close event, will be very useful. Peter – PeterB Nov 19 '14 at 3:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.