25 votes
Accepted

Magento 2 Check If Customer is Subscribed to Newsletter

First inject the \Magento\Newsletter\Model\Subscriber class in your constructor: protected $_subscriber; public function __construct( ... \Magento\Newsletter\Model\Subscriber $subscriber ...
user avatar
24 votes
Accepted

How to create popup in magento 2?

It is very simple to create modal popup in Magento 2. Like if you want to display any static block in popup, you can do it simply by calling the content and displaying it. We should start by creating ...
user avatar
16 votes

Newsletter Spam Subscriber

You can use newsletter subscription confirmation feature in Magento. Enable this from: admin-login >> System >> Configuration >> Customer >> Newsletter >> select Yes from Need to confirm drop-...
user avatar
  • 2,356
15 votes
Accepted

add Newsletter checkbox in billing form

hi you can add this by add below code at billing.phtml <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" checked="...
user avatar
  • 75.7k
15 votes
Accepted

Newsletter in Static Block Magento 2.1

You almost had it. Here's the code you need to use: {{block class="Magento\Newsletter\Block\Subscribe" name="static.newsletter" template="Magento_Newsletter::subscribe.phtml"}}
user avatar
14 votes

Magento 2 : How to add additional fields to newsletter

The below worked fine for me. There is plenty of room for improvement. The form needs styling help and this adds additional first/last name fields to the admin grid rather than merging them with the ...
user avatar
  • 2,328
13 votes
Accepted

How to get Newsletter form shown in footer block?

I'm not 100% sure what you mean by 'get', I thought you meant add it but as it's already there in the blank and Luma theme and the previous answer is pretty much correct I presume you want to move it ...
user avatar
  • 15.2k
12 votes
Accepted

How to create newsletter subscriber programmatically magento2

To do that you can inject Magento\Newsletter\Model\SubscriberFactory in your constructor: protected $subscriberFactory; public function __construct( // \Magento\Newsletter\Model\...
user avatar
11 votes
Accepted

Magento 2.2 - adding name field to newsletter module

I have created module for your requirement and firstname & lastname Create registeration file. app\code\Hm\Newsletters - registration.php <?php \Magento\Framework\Component\...
user avatar
  • 3,200
8 votes
Accepted

magento session messages printing

You can print the messages in a template like this: <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> But there is a catch. For example the newsletter subscription message is ...
user avatar
  • 195k
8 votes
Accepted

Magento Newsletter Subscription Confirmation Succesful not sent

Search the file /app/code/core/Mage/Newsletter/Model/Subscriber.php copy the whole content to MyVendor/Tweaks/Newsletter/Model/Subscriber.php Then find the below public function confirm($code) ...
user avatar
  • 3,522
8 votes

Newsletter block at footer weird problem

Since the newest Security Patch / Release you need to add a permission for the block type under "System -> Permissions -> Blocks"
user avatar
  • 151
8 votes
Accepted

Magento2 : How to call Newsletter in PWA

This code is to add newsletter in the footer, the code is based on venia concept package. change as per your need. Here you have to create REST Api module for newsletter in Magento, there is free ...
user avatar
7 votes

How to check if customer is already subscribed to newsletter

You have to check also the subscription status: if(Mage::getSingleton('customer/session')->isLoggedIn()){ $email = Mage::getSingleton('customer/session')->getCustomer()->getData('...
user avatar
7 votes
Accepted

subscribe mail isn't working in magento

As you put the code into the template of the Mage_Page_Block_Html_Header block the getFormActionUrl method originally referenced to Mage_Newsletter_Block_Subscribe is not returning a right value ...
user avatar
  • 11.5k
7 votes

How to disable sending of Newsletter email in Magento2

We can do this in Magento2 using Plugins (Interceptors) In di.xml of a custom plugin <type name="Magento\Newsletter\Model\Subscriber"> <plugin name="my-subscriber" type="MyNamespace\...
user avatar
  • 1,366
7 votes

Magento 2 How to disable newsletter subscription success email

Magento doesn’t have default functionality to stop sending newsletter emails. Below I show an example of how to disable newsletter subscription emails. Create a custom module and add di.xml Override ...
user avatar
  • 21.6k
6 votes
Accepted

how to move newsletter block from footer to left in magento

In app/design/frontend/theme/theme/layout/newsletter.xml change from: <reference name="footer"> <block type="newsletter/subscribe" name="footer.newsletter" as="newsletter" before="...
user avatar
  • 4,770
6 votes
Accepted

Magento2 : Pop up on page load in magento home page

There is support for pop ups / modals in magento 2 without the need for bootstrap. See information from dev docs below: http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/widgets/...
user avatar
  • 5,245
5 votes

Redirect to another page after newsletter signup

I ran into this same issue, and there is a simple fix. Rather than overwriting controllers, you can pass a hidden field in the form that defines the redirect URL. <input type="hidden" name="...
user avatar
  • 51
5 votes
Accepted

Issue coupon on newsletter signup

This is not available out the box, and no rule would make this happen. You would need to do some custom code to make this work, as well as utilize mailchimps callback hooks to allow you to issue ...
user avatar
  • 9,796
5 votes
Accepted

Rewrite Admin Newsletter Grid

First, your configuration file should be config.xml and not config.php. Second it must declare the module like this, this bit seems to be missing in the code you pasted: <modules> <...
user avatar
5 votes

Magento 2 : Newsletter Subscription Event

Fernando Miguel's answer doesn't work, change newsletter_subscriber_save_before For newsletter_subscriber_save_after After that, you'll be able to get the subscriber ID. Or even get the email ...
user avatar
  • 250
5 votes
Accepted

Magento 2: How to solve the message "Unable to send email"?

To send email from Magento you need to configure an email SMTP server on the web host/server. Magento uses the PHP mail() method by default, although there are extensions you can install to override ...
user avatar
  • 1,287
5 votes
Accepted

How to set customer subscribed to newsletter by customer id

Notes: This answer may need to be changed in later version of Magento when service contract is implemented for the newsletter module. For now we will have to make do with using model method. use ...
user avatar
5 votes

Magento2 : How to add custom link in footer inside newsletter block?

For add custom link in footer inside newsletter block.You Need to override these file in your custom theme vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml. like this one ...
user avatar
4 votes

Newsletter subscription box positioning in footer

Just add below single line & it works <?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>
user avatar
  • 212
4 votes

How to check if customer is already subscribed to newsletter

In my opinion none of the above answers are very convenient in that they either don't check if the customer is actually subscribed or don't handle the case where a subscription has not been found, so ...
user avatar
  • 1,053
4 votes

Magento cron job issues newsletters not leaving

I had same issue,I guess its the bug from Magento 1.8~1.9.1. Try this. Open the file cron.php in the root directory of Magento and look for (around line 47): $isShellDisabled = (stripos(PHP_OS, ‘win’...
user avatar
  • 81
4 votes

Newsletters not sending

Check if Magento cron is running by looking into cron_schedule table. There should be resent records for newsletter queue listed in the table and status of the module execution Run cron service ...
user avatar
  • 645

Only top scored, non community-wiki answers of a minimum length are eligible