PHPackages                             landofcoder/module-newsletter-ajax - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. landofcoder/module-newsletter-ajax

AbandonedArchivedMagento2-module[Utility &amp; Helpers](/categories/utility)

landofcoder/module-newsletter-ajax
==================================

This module support ajax newsletter subscription

201PHP

Since May 20Pushed 5y agoCompare

[ Source](https://github.com/landofcoder/module-newsletter-ajax)[ Packagist](https://packagist.org/packages/landofcoder/module-newsletter-ajax)[ RSS](/packages/landofcoder-module-newsletter-ajax/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

Magento 2 Newsletter Ajax
=========================

[](#magento-2-newsletter-ajax)

Magento 2 Newsletter Ajax allows your customers to subscribe to the newsletter without refreshing the page. It also returns JSON data to developers who want a custom subscription process.

How to Install
--------------

[](#how-to-install)

Download to the project root `app/code/Lof/NewsletterAjax` directory.

Run the following commands in the project root:

### Developer Mode

[](#developer-mode)

```
php bin/magento module:enable Lof_NewsletterAjax
php bin/magento setup:upgrade

```

### Production Mode

[](#production-mode)

```
php bin/magento module:enable Lof_NewsletterAjax
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

```

How to Use
----------

[](#how-to-use)

By installing the module you will now be able to make AJAX requests to the newsletter subscription endpoint `https://yourdomain.com/newsletter/subscriber/new`and get a JSON response back with a `status` and `message`. This will not interfere with current newsletter subscription forms as the module checks the HTTP request header and bases the response on that value. This ensures compatiblity with the core Magento 2 functionality and other modules extending the newsletter subscription.

You can use this snippet as a starting point if you want to run a custom process on the front-end:

```

    require([
        'jquery'
    ], function ($) {
        $(function () {
            let subscribeForm = $('.form.subscribe');

            $(subscribeForm).on('submit', function(e) {
                e.preventDefault();
                let email = $('#newsletter').val();

                if ($(subscribeForm).valid()) {
                    $.ajax({
                        url: 'newsletter/subscriber/new/',
                        type: 'POST',
                        data: {
                            'email' : email
                        },
                        dataType: 'json',
                        showLoader: true,
                        complete: function(data, status) {
                            let response = JSON.parse(data.responseText);
                            // Run your custom process using the response data
                        }
                    });
                }
            });
        });
    });

```

User Guide
----------

[](#user-guide)

Login to your Magento 2 admin and select "Stores" from the sidebar. Under "Settings" choose "Configuration". From there you can select "Landofcoder" from the sidebar and see the Newsletter Ajax options. Enabling this will override the default newsletter subscription input in the footer and will change it to use AJAX to make a background request and will launch a modal with the results.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/db448e930f6e4cb8da91a337027d8b11645732d24ede2a46c5844967a395ca1e?d=identicon)[landofcoder](/maintainers/landofcoder)

---

Top Contributors

[![landofcoder](https://avatars.githubusercontent.com/u/194975?v=4)](https://github.com/landofcoder "landofcoder (2 commits)")

### Embed Badge

![Health badge](/badges/landofcoder-module-newsletter-ajax/health.svg)

```
[![Health](https://phpackages.com/badges/landofcoder-module-newsletter-ajax/health.svg)](https://phpackages.com/packages/landofcoder-module-newsletter-ajax)
```

###  Alternatives

[hazaveh/verify-domain

Verify Domain Ownership with PHP

238.6k1](/packages/hazaveh-verify-domain)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
