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 ...
Raphael at Digital Pianism's user avatar
25 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 ...
Kazim Noorani's 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-...
Nits's user avatar
  • 2,486
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"}}
Raphael at Digital Pianism's 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 ...
Pmclain's user avatar
  • 2,588
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 ...
Ben Crook's user avatar
  • 15.7k
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\...
Raphael at Digital Pianism's 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\...
Ranganathan's user avatar
  • 3,220
9 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 ...
Prince Patel's user avatar
  • 22.7k
9 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 ...
Ashish Viradiya's user avatar
8 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\...
quickshiftin's user avatar
  • 1,416
7 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 ...
Macr1408's user avatar
  • 280
6 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 ...
thaddeusmt's user avatar
  • 1,395
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/...
harri's user avatar
  • 5,455
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> <...
Raphael at Digital Pianism's user avatar
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="...
Allan's user avatar
  • 51
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 ...
William Tran's 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 ...
Magento_Bhurio's user avatar
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 ...
Louis B.'s user avatar
  • 1,111
4 votes

What does the STATUS_NOT_ACTIVE status in newsletter mean?

I think your interpretation is correct for STATUS_SUBSCRIBED and STATUS_UNSUBSCRIBED, but there is a subtlety you've missed for STATUS_UNCONFIRMED. The difference between STATUS_UNCONFIRMED and ...
Dom's user avatar
  • 468
4 votes
Accepted

Magento 2 : Newsletter Subscription Event

You can use the predispatch/postdispatch events triggerred by the controller action class. In your case: controller_action_predispatch_newsletter_manage_save to observe a behavior BEFORE the save ...
Raphael at Digital Pianism's user avatar
4 votes

Magento 2.2 something went wrong with the subscription

I just changed the "Disable Email Communications" to yes in Magento 2 ( Stores > Configuration > Advanced > System > Mail Sending Settings > Disable Email Communications). It works for me !
Hafiz Arslan's user avatar
4 votes

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

you can override below file in your theme and update footer container also add custom link <?xml version="1.0"?> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:...
Rakesh Donga's user avatar
  • 5,344
4 votes
Accepted

Magento2 newsletter not sending the success mail

If you're using MailChimp extension in Magento 2 then there is one system configuration in your Backend. Magento always manage emails : Yes Please set above config value No and then save ...
Kishan Savaliya's user avatar
3 votes

Where is the newsletter 'general subscription' field stored in the database

I figured it out. The table 'newsletter_subscriber' contains several fields, the ones most meaningful for my purpose are: store_id customer_id the customer entity_id subscriber_email perhaps ...
MarkE's user avatar
  • 1,479
3 votes

How to get Newsletter form shown in footer block?

if you are creating your own them in view/frontend/layout/default.xml put tag like this <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
liyakat's user avatar
  • 3,995
3 votes

Something went wrong with the subscription alert in Magento2

It's unable to send the email confirmation for whatever reason. You need to configure your server to allow php to send emails.
Dallas Clarke's user avatar
3 votes
Accepted

Inserting Newsletter into CMS page. Magento 2

I removed "templates" from the path.
Matthew McLennan's user avatar
3 votes

How do I import newsletter subscribers into M2?

Add below code to any file and put that file in magento root <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $params = $_SERVER; $bootstrap = Bootstrap::...
Prashant Valanda's user avatar
3 votes
Accepted

Error on 'Newsletter Subscribers'

I've seen this issue before where the BL_CustomGrid module loads 2 of the same tables and give you this issue. so your custom grid configuration is off. Try to remove it. or try to disable that module ...
Kay Int Veen's user avatar
  • 1,503

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