I'm in the checkout page and there are two options there: one radio button so that the user can choose a receipt when he/she submits the order and one button so the user can choose an invoice instead. When the user chooses the invoice button, I would like it to check if the user is logged in, and if he's not, the login pop up window should come up that makes the user log in. So my sample code is the following (billing.phtml file):

jQuery(document).ready(function() {

jQuery("#plirwmi_off").on('change', function (e) {


   jQuery('#shipping-area .visitor-disable').hide();



      alert('Not Logged in');

      //make the pop up window appear

      <?php elseif (Mage::helper('customer')->isLoggedIn()): ?>

      alert('Logged in');

       <?php endif; ?>



I've found the login pop up window already and I guess I have to call it somehow? Any hint ?

2 Answers 2


You can use this code to show login form fields on your popup. Tested on

echo $this->getLayout()->createBlock('customer/form_login')
  • This one is good!!! I tried it and the box pops up. However when I hit on the submit button of the pop up box it won't login.
    – Stefanos
    Aug 1, 2017 at 8:42
  • Actually when I click on the submit button it does nothing.. any hint ?
    – Stefanos
    Aug 1, 2017 at 11:04
  • Please check is there any javascript to prevent this form submission.
    – DelwaR
    Aug 3, 2017 at 8:18
  • a formkey is missing form your form. i used same code but there was no formkey i placed form key and its now working fine.
    – Taseen
    Jan 19, 2019 at 5:49

You can use ajax-popup-for-login-registration extension which is using the pop box. I think, this extension, solve your problem and its free


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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