The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
635 Ready
455 Need Help
Vendors 🏆 Leaderboard
Potentially Abandoned v1.2.1

Ajax Newsletter Subscription for Magento 2

magepal/magento2-ajax-newsletter-subscribe 61

This extension makes it easy to add an AJAX subscription to the Magento newsletter.

5,318
Downloads
Below average
1
GitHub Stars
Below average
6y ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
2 warnings
L1 PHPStan

Release Discipline

? SemVer not assessable What is this?

Release history audited up to v1.2.1

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.2.1 on Magento 2.4.9
May 27, 2026
v1.2.1 on Magento 2.4.8-p4
Mar 21, 2026
v1.2.1 on Magento 2.4.8-p3
Dec 15, 2025
v1.2.1 on Magento 2.4.8-p2
Aug 14, 2025
v1.2.1 on Magento 2.4.8
May 20, 2025
v1.2.1 on Magento 2.4.7-p4
Feb 15, 2025

+6 older tests

Share This Module's Status

Ajax Newsletter Subscription for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Ajax Newsletter Subscription for Magento 2

Installation

Step 1
Using Composer (recommended)
composer require magepal/magento2-ajax-newsletter-subscribe
Manually
  • Download the extension
  • Unzip the file
  • Create a folder {Magento 2 root}/app/code/MagePal/AjaxNewsletterSubscribe
  • Copy the content from *unzip folder
Step 2 - Enable extension ("cd" to {Magento root} folder)
  php -f bin/magento module:enable --clear-static-content MagePal_AjaxNewsletterSubscribe
  php -f bin/magento setup:upgrade

Usage

$('#newsletter-validate-detail').submit(function (e) {
    if ($(this).valid()) {
         var url = $form.attr('action');
         var postData = $form.serializeArray();
    
        try {
            $.ajax({
                url: url,
                dataType: 'json',
                type: 'POST',
                showLoader: true,
                data: $.param(postData),
                complete: function (data) {
                    if (typeof data === 'object') {
                        data = data.responseJSON;
                        //json object
                    } else {
                        //Unknown Error
                    }
                }
            });
        } catch (e) {
                //check for errors
        }
    }
    
    return false;
});

Return JSON


$response = [
    'status' => 1,
    'msg' => __('The confirmation request has been sent.'),
];

$response = [
    'status' => 0,
    'msg' => __('There was a problem with the subscription: %1', $e->getMessage()),
];


© MagePal LLC. | www.magepal.com

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.