How to show popup only in home page?

There is need to do small changes in this file:

app/code/community/ES/Newsletterpopup/Block/Popup.php

Please open it and find this method:

public function isActivePopUp()
{
    return Mage::getStoreConfig('newsletterpopup/popup/isactive') && Mage::getStoreConfig('newsletterpopup/general/is_active');
}

Change this method to:

public function isActivePopUp()
{
     if ($this->getPageId() != 'cms_page_ID') {
         return false;
     }
     return Mage::getStoreConfig('newsletterpopup/popup/isactive') && Mage::getStoreConfig('newsletterpopup/general/is_active');
}

and in this method you have to change "ID" to your home page ID for example to cms_page_2.


Magento is not sending success email if subscription confirmation is enabled. How to send?

Magento is not sending it by default, but it's easy to change!

1. You have to make a copy of this file:

app\code\core\Mage\Newsletter\Model\Subscriber.php

and paste it here.

app\code\local\Mage\Newsletter\Model\Subscriber.php

2. Open new file and replace this part of code:

public function confirm($code) {
    if($this->getCode()==$code) {
         $this->setStatus(self::STATUS_SUBSCRIBED)
             ->setIsStatusChanged(true)
             ->save();
         return true;
     }
     return false;
}

to this code

public function confirm($code) {
    if($this->getCode()==$code) {
         $this->setStatus(self::STATUS_SUBSCRIBED)
             ->setIsStatusChanged(true)
             ->save();
         $this->sendConfirmationSuccessEmail();
         return true;
     }
     return false;
}

3. Clear the cache and test it. 


How to create custom popup trigger button?

There is possibility to create custom trigger button starting from extension version 1.7.8. If you are using older version, please update extension.
You have to add this class
.newsletter_popup to your link. For example:

<a class="btn newsletter_popup" href="#">MY CUSTOM BUTTON</a>


How to add subscription form to cms page

There is possibility to create cms page and insert subscription form. The link of this page could be used in social networks or in advertisements.

1. Create cms page

First of all you need to create new cms page: Cms >> Pages >> Add new.

2. Enter the following data to the form

Content: 

{{block type="newsletterpopup/cms_popup" template="newsletterpopup/cms/popup.phtml"}}

Design >> Layout Update XML

<reference name="head">
        <action method="addItem"><type>skin_css</type><name>css/newsletterpopup_cms.css</name><params/></action>
</reference>

<reference name="before_body_end">
        <remove name="newsletterpopup_popup"/>
</reference>

General information:

Page Title: Subscription form
Url key: subscribe
Store view: All Store Views

3. Save and test

Save cms page and go to the link: http://YOUR_STORE_URL/subscribe. Sometimes the link could be different: http://YOUR_STORE_URL/subscribe/ or http://YOUR_STORE_URL/subscribe.html

If the subscription form is not showing on the page probably you need to add permissions for the block newsletterpopup/cms_popup.

4. Add permissions for block newsletterpopup/cms_popup

Please go to: 
System > Permissions > Blocks > Add new block

Enter the following information:

Block name: newsletterpopup/cms_popup
Is Allowed: Yes

Save the permissions and test your page.



Coupon code is missing in the email

Please make sure that you are using correct variable in the transactional email template. 

{{var subscriber.coupon_code}}