# mageplaza/module-product-alerts-graphql

> Magento 2 Product Alerts GraphQl Extension

`composer require mageplaza/module-product-alerts-graphql`

Canonical URL: https://packagento.com/mageplaza/module-product-alerts-graphql

## At a glance

- **Vendor**: mageplaza (https://packagento.com/mageplaza.md)
- **Latest version**: 1.1.0 — released 2023-02-03
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/mageplaza/module-product-alerts-graphql and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require mageplaza/module-product-alerts-graphql:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 Product Alerts GraphQl Extension

## README


**Magento 2 Product Alerts GraphQL is now a part of Mageplaza Product Alerts extension that adds GraphQL features.** This upgrade supports PWA compatibility. Now, with Mageplaza Product Alerts, you and get and push data on the website with GraphQl in a breeze.

[Mageplaza Product Alerts for Magento 2](https://www.mageplaza.com/magento-2-product-alerts/) is a useful tool to inform customers about any changes in products, promotion programs, or simply a way to maintain the relationship with customers. 

The first outstanding feature of this extension is the “Out of stock” notification. When a product is out of stock, customers will see a pop-up with a message to inform them that the product is no longer available. After that, customers interested in the product can immediately hit the “Notify me” button to get the notification via email when the product is back in stock.

Another pop-up will display for customers to subscribe if they want to get notification about the changes of a specific product’s price. The store owner can take advantage of these customers’ concerns to notify them about the discounts on products they’re already interested in. This can encourage them to purchase at a better price. 

The notifications on restocked products or price changes can be sent to customers manually or automatically. Customers don’t have to track the update themselves on the store; instead, they can totally get all the accurate information via Product Alerts notifications. The extension supports all product types, including simple product, configurable product, group product, virtual product, bundle product, and downloadable product. 

With the support of the Mageplaza Report for Magento 2, the store admin can view all the product requests from customers in a clear data report. The report includes the most and recent requests about back-in-stock products and price changes. These valuable statistics help you understand customers’ interests and behaviors so that it’ll be easier to know which products are the most potential. 

The extension supports non-login customers to request price change and get notifications about the result. New visitors will have no burden to create an account for the first time they browse your website. Only a simple configuration from the admin backend will get everything done well. 

### 1. How to install
Run the following command in Magento 2 root folder:

```
composer require mageplaza/module-product-alerts-graphql
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

**Note:** 
Magento 2 Product Alerts GraphQL requires installing [Mageplaza Product Alerts](https://www.mageplaza.com/magento-2-product-alerts/) in your Magento installation.

### 2. How to use
To start working with **Product Alerts GraphQL** in Magento, you need to:

- Use Magento 2.3.x or higher. Return your site to developer mode

- Set **GraphQL endpoint** as `http://<magento2-3-server>/graphql` in url box, click **Set endpoint**. (e.g. `http://develop.mageplaza.com/graphql/ce232/graphql`)

- The queries Mageplaza supports can be viewed [here](https://documenter.getpostman.com/view/10589000/SzS4RT6V?version=latest). 


![a](https://i.imgur.com/pcs5qdb.png)

### 3. Devdocs
- [Magento 2 Product Alerts API & examples](https://documenter.getpostman.com/view/10589000/SzRuXBU4?version=latest) 
- [Magento 2 Product Alerts GraphQL & examples](https://documenter.getpostman.com/view/10589000/SzS4RT6V?version=latest)

Click on Run in Postman to add these collections to your workspace quickly.

![Magento 2 blog graphql pwa](https://i.imgur.com/lhsXlUR.gif)

### 4. Contribute to this module 
Feel free to **Fork** and contribute to this module.

You can create a pull request, and we will consider to merge your proposed changes in the main branch. 

### 5. Get support 
- Don't hesitate to contact us if you have any question. We're excited to hear from you, and our support team will try best to solve your problems as soon as possible. 
- If you find this post helpful, please give it a **Star** ![star](https://i.imgur.com/S8e0ctO.png)

## Changelog

CHANGELOG: https://www.mageplaza.com/releases/product-alerts

## Recent Versions

| Version | Released |
|---|---|
| 1.1.0 | 2023-02-03 |
| 1.0.1 | 2021-02-23 |
| 1.0.0 | 2020-03-20 |

## Quality

Latest release (1.1.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 32 | 32 warnings (ruleset: Magento2) — 31 auto-fixable with phpcbf |
| PHPMD | Warning | 3 | 3 rule violations (UnusedFormalParameter:3) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 54 | 54 | – | – |
| 2.4.8 | – | 54 | 70 | – |
| 2.4.9 | – | – | 70 | 70 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["mageplaza/module-product-alerts-graphql"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

mageplaza is a Magento 2 vendor on Packagento. See https://packagento.com/mageplaza.md for their full catalogue.

