X hide

Magento Popup Login v1.x Developer's Guide & API Reference

From Plumrocket Documentation

You are viewing:  Popup-login-magento-extension-32.png  Popup Login

Display Popup Manually

In order to configure the Popup Login Extension for a particular page element you will have to select Manually for the option Display Popup. You will also have to write an event onclick="return showPopupLogin(this)" in the code for the chosen page element. For example:

<a href="/seespecialevent" onclick="return showPopupLogin(this)">See Special Event</a>

Disable Popup Manually

If you want to disable Popup for some pages, you will have to add the following code to the appropriate section of xml file:

<update handle="popuplogin_remove" />

For instance:

<catalog_category_default translate="label">
 <update handle="popuplogin_remove" />

If you want to disable Popup only for a particular element on the page, you will have to add the parameter data-popup="yes" to the selected element. For instance, if you want to disable Pop up for the "About Us" link, you will have to edit the code

<a href="/about/">About Us</a>

making the following changes:

<a href="/about/" data-popup="yes">About Us</a>

You can also deactivate Popup for a particular controller or block (without disabling it completely), if you set the "Manually" mode for it. As a result. Popup will not be displayed on the page. It is very convenient if you want to hide popup due to certain conditions, input parameters and session values.


For instance, you want to hide Popup on the Contact us page. To do this you should add the following in the page template

public function indexAction()
 $this->getLayout()->getBlock('contactForm')->setFormAction( Mage::getUrl('*/*/post') );
 $this->getLayout()->getBlock('popup.login')->setMode(4);}} // add this line to set popup login to manual mode on this page