# someplus/module-mage-content-reactions

> Content reactions (emoji) module for Magento 2 CMS pages

`composer require someplus/module-mage-content-reactions`

Canonical URL: https://packagento.com/someplus/module-mage-content-reactions

## At a glance

- **Vendor**: Some Plus (https://packagento.com/someplus.md)
- **Latest version**: 1.0.2 — released 2026-07-25
- **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/someplus/module-mage-content-reactions 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 someplus/module-mage-content-reactions:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Content reactions (emoji) module for Magento 2 CMS pages

## README

Enhance your Adobe Commerce store with interactive content reactions. This extension allows customers to express their feelings about your CMS pages through emojis.

---

### 1. Overview
The **MageContentReactions** extension by SomePlus is a lightweight, performance-oriented tool designed for Adobe Commerce (Magento 2). It injects a modern, AJAX-based reaction block into your CMS pages, encouraging user engagement without affecting page load speeds.

#### Key Features:
*   6 Interactive Emojis: Like, Love, Haha, Wow, Sad, and Celebrate.
*   Full Page Cache (FPC) Friendly: Uses AJAX to load and sync reaction data.
*   Guest & Customer Support: Allow everyone or only logged-in users to react.
*   Responsive Design: Works perfectly on mobile, tablet, and desktop.
*   Admin Controls: Enable/Disable globally or on specific pages.

---

### 2. Installation Guide

#### Prerequisites
*   Magento 2.x (Open Source or Adobe Commerce)
*   PHP 8.1 or higher

#### Installation Steps (Manual)
1.  **Upload:** Extract the extension package and upload it to your Magento installation under the following directory: `app/code/SomePlus/MageContentReactions/`
2.  **Enable Module:** Run the following command in your Magento root directory:
    ```bash
    php bin/magento module:enable SomePlus_MageContentReactions
    ```
3.  **Upgrade Database:** Apply the database schema:
    ```bash
    php bin/magento setup:upgrade
    ```
4.  **Compile Code:** Generate dependency injection classes:
    ```bash
    php bin/magento setup:di:compile
    ```
5.  **Deploy Assets:** (Required if in production mode):
    ```bash
    php bin/magento setup:static-content:deploy
    ```
6.  **Clear Cache:**
    ```bash
    php bin/magento cache:flush
    ```

---

### 3. Configuration (Admin Panel)

Once installed, go to **Stores > Configuration > SomePlus > Content Reactions**.

#### General Settings
*   **Enable Module:** Master switch for the extension.
*   **Allow Guest Reactions:** Set to 'Yes' to allow non-logged-in users to interact.
*   **Reaction Types:** Customize which emojis you want to display.

#### Display Settings
*   **Show on CMS Pages:** Automatically inject the block into all CMS pages.
*   **Excluded Page Identifiers:** List specific pages where you don't want the reaction block to appear (e.g., `home`, `privacy-policy`).
*   **Position:** Choose to show reactions before or after the main content.
*   **Show Reaction Counts:** Display how many people have clicked each emoji.

---

### 4. Frontend Usage
The extension automatically detects when it's on a CMS page and renders the block. 
*   **Interacting:** Users click an emoji to react. A second click on the same emoji removes the reaction.
*   **Privacy:** If guest reactions are disabled, users will be prompted to log in.
*   **Feedback:** Real-time messages (e.g., "You reacted with ❤️") provide immediate feedback to the user.

---

### 5. Troubleshooting & Support
*   **Reactions not showing?** Ensure the module is enabled in configuration and run `bin/magento cache:flush`.
*   **Counts not updating?** Check your browser console for AJAX errors. Ensure permissions for `/var/log` are correct to see extension logs.

For dedicated support, visit: [https://someplus.work/support](https://someplus.work/support)
Email: info@someplus.work

---
© 2024 SomePlus. All rights reserved.

## Changelog

### [1.0.0] - 2024-01-13
#### Added
- Initial release of MageContentReactions for Adobe Commerce.
- Built-in support for 6 reaction types (Like, Love, Haha, Wow, Sad, Celebrate).
- Full Page Cache (FPC) compatibility using AJAX data sourcing.
- Comprehensive Admin Configuration panel:
  - Globalization: Toggle the extension on or off.
  - Security: Enable/Disable guest reactions.
  - Customization: Choose which reactions to display.
  - Targeting: Exclude specific CMS pages by identifier.
  - Layout: Option to position the block before or after page content.
- Secure AJAX handling with CSRF validation and form key integration.
- Responsive frontend UI with modern CSS gradients and animations.
- Dark Mode support based on system preferences.
- PSR-4 compliant architecture and optimized database schema.

## Recent Versions

| Version | Released |
|---|---|
| 1.0.2 | 2026-07-25 |
| 1.0.1 | 2026-07-25 |
| 1.0.0 | 2026-07-25 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | >=103.0 |
| magento/module-cms | >=104.0 |
| magento/module-customer | >=103.0 |
| php | >=8.1 |

## Quality

Latest release (1.0.2) 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 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### 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 | 4 | 4 warnings (ruleset: Magento2), 4 auto-fixable with phpcbf |
| PHPMD | Pass | 0 |  |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 4 | valid; 4 advisory notes (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 | 3 | 3 | – | – |
| 2.4.8 | – | 3 | 3 | – |
| 2.4.9 | – | – | 3 | 3 |


### 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=["someplus/module-mage-content-reactions"],
  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

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

