I have a popup Login/register. But when i click "add to wishlist" when not logged in it redirects me to a standard login page. I would like to change it to the login popup.

This is the header login/registration code:

<a href="http://x.com/x/customer/account/login/" title="Login / Register" id="login-popup">Login / Register

2 Answers 2


You'll need to update the following lines to use the popup window:

<?php if ($this->helper('wishlist')->isAllow()) : ?>
  <a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="c-wishlist link-wishlist" title="<?php echo $this->__('Add to Wishlist') ?>">WishList</a>
<?php endif; ?>

Which is located in app/design/frontend/{theme}/{package}/template/catalog/product/list.phtml

You might need to look at the login/register popup to see how they do it in order to do it with this.


You need to modify whislist Code in your template.

        //put your whistle button to open your login register pop-up  

        // put you real wishlist button
  • Is this code for magento 2. If yes then in which file we should make changes. As I require pop-up login window to be open on wish list button click before logging in.
    – Tush
    Commented Jan 12, 2017 at 6:24

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.