# etechflow/module-advanced-product-reviews

> Advanced Product Reviews for Magento 2 — rich reviews with images & video, pros/cons, helpful voting, verified-buyer filters, review summaries, admin replies, Q&A, review reminders with auto-generated coupons, and headless (REST/GraphQL) support.

`composer require etechflow/module-advanced-product-reviews`

Canonical URL: https://packagento.com/etechflow/module-advanced-product-reviews

## At a glance

- **Vendor**: etechflow (https://packagento.com/etechflow.md)
- **Latest version**: 1.1.5 — released 2026-06-22
- **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/etechflow/module-advanced-product-reviews 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 etechflow/module-advanced-product-reviews:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Advanced Product Reviews for Magento 2 — rich reviews with images & video, pros/cons, helpful voting, verified-buyer filters, review summaries, admin replies, Q&A, review reminders with auto-generated coupons, and headless (REST/GraphQL) support.

## README

Rich, conversion-focused product reviews for Magento 2 (Open Source **and** Adobe
Commerce / Cloud). Replaces the bare core review experience with photos & video,
pros/cons, verified-buyer badges, helpful voting, review summaries, admin
replies, customer Q&A, post-purchase reminders with auto-generated coupons,
AI auto-translation, an analytics dashboard, and a full **headless (GraphQL +
REST)** layer with a **Hyvä** theme integration.

- **Vendor / module:** `ETechFlow_AdvancedProductReviews`
- **Compatibility:** Magento 2.4.4 – 2.4.8, PHP 8.1 – 8.4, CE / EE / Cloud
- **Themes:** Luma, Hyvä (via the companion `ETechFlow_AdvancedProductReviewsHyva` module), and headless storefronts (PWA Studio / custom)

---

### Features

#### Storefront reviews
- **Photos & video** on reviews (real MIME sniffing, not just extension checks, to block spoofed uploads)
- **Pros / cons** lists and a **"would recommend"** flag
- **Verified Buyer** badge (detected from the customer's order history)
- **"Was this helpful?"** voting with duplicate-vote protection (per customer, and per guest via a privacy-preserving hash)
- **Summary bar**: average rating, star distribution, recommend %, verified count
- **Filtering & sorting**: by rating, verified-only, with-media; newest / oldest / most-helpful / highest / lowest
- **Comments** on reviews, including store (admin) replies
- **AI auto-translation** of reviews into the storefront language, powered by the **Claude API**, cached per language so each review is translated once

#### Customer Q&A
- Customers ask questions on a product; staff or other customers answer
- Moderation workflow (pending / approved / rejected), admin answers flagged as official

#### Post-purchase review reminders
- Schedules a reminder email a configurable number of days after an order completes
- Optional **auto-generated coupon** as a thank-you incentive (uses Magento SalesRule coupon generation)
- Skips customers who have already reviewed; idempotent per order; cron-driven

#### Admin
- Configuration under **Stores ▸ Configuration ▸ ETechFlow ▸ Advanced Product Reviews**
- Grids for **Comments**, **Questions**, and **Reminders** with mass actions
- **Analytics dashboard** (Reports ▸ Reviews Analytics): KPIs, rating distribution, 12-month trend, top products — dependency-free inline charts

#### Headless (Phase 7)
- **GraphQL** API for summary, review list, Q&A, and mutations (vote / comment / ask / translate)
- **REST** API for review summary and review-extra data
- **Hyvä** companion module renders the whole UI from the GraphQL API (Tailwind + Alpine)

---

### Installation

#### Composer (recommended)
```bash
composer require etechflow/module-advanced-product-reviews
bin/magento module:enable ETechFlow_AdvancedProductReviews
bin/magento setup:upgrade
bin/magento setup:di:compile        # production mode only
bin/magento cache:flush
```

#### Manual
Copy the module to `app/code/ETechFlow/AdvancedProductReviews`, then run the same
`module:enable` / `setup:upgrade` / `cache:flush` commands.

> Hyvä stores should also install the companion module
> `etechflow/module-advanced-product-reviews-hyva` (see its own README).

---

### Configuration

`Stores ▸ Configuration ▸ ETechFlow ▸ Advanced Product Reviews`

| Section | Key settings |
|---|---|
| **General** | Enable module, allow guest reviews, auto-approve |
| **Review elements** | Pros/cons, recommend, helpful voting, comments (+ guest), Q&A |
| **Media** | Enable images / videos, max counts & sizes, allowed video types |
| **Translation (Claude)** | Enable, **Claude API key** (stored encrypted), model, auto-translate |
| **Spam** | CAPTCHA toggle |
| **Reminders** | Enable, delay (days), coupon toggle + SalesRule id, email template |

**Translation and Reminders ship OFF by default.** Enable them and supply the
Claude API key / coupon rule when you're ready. The Claude key is stored with
Magento's encrypted-config field and is never committed to source.

---

### Headless API

#### GraphQL
All types are namespaced with `etf` / `Etf` so they never collide with core.

Queries: `etfReviewSummary`, `etfProductReviews` (paged + filter + sort),
`etfProductQuestions`, and `etf_review_summary` added onto `ProductInterface`
(so a `products` query can pull the summary inline).

Mutations: `etfVoteReviewHelpful`, `etfPostReviewComment`,
`etfAskProductQuestion`, `etfTranslateReview`.

```graphql
{
  etfReviewSummary(sku: "24-MB01") {
    review_count
    average_rating
    rating_distribution { rating count percent }
  }
  etfProductReviews(sku: "24-MB01", pageSize: 5, sort: HELPFUL,
                    filter: { verified_only: true }) {
    total_count
    items { review_id title rating nickname pros cons helpful_count
            media { media_type url } comments { author_name comment } }
  }
}
```

#### REST
| Method | Endpoint | Auth |
|---|---|---|
| GET | `/V1/etechflow-reviews/summary/product/:productId` | anonymous |
| GET | `/V1/etechflow-reviews/summary/sku/:sku` | anonymous |
| GET | `/V1/etechflow-reviews/extra/review/:reviewId` | anonymous |
| GET | `/V1/etechflow-reviews/extra/:extraId` | admin |
| GET | `/V1/etechflow-reviews/extra/search` | admin |
| POST | `/V1/etechflow-reviews/extra` | admin |
| DELETE | `/V1/etechflow-reviews/extra/:extraId` | admin |

```bash
curl https://store.example.com/rest/V1/etechflow-reviews/summary/sku/24-MB01
```

---

### Data model

Eight tables, all `etechflow_*`, foreign-keyed to core `review` with
`ON DELETE CASCADE` (child rows clean up when a review is deleted):
`review_extra`, `review_media`, `review_vote`, `review_comment`,
`review_translation`, `qa_question`, `qa_answer`, `review_reminder`.

> `product_id` columns are **indexed, not hard-FK'd**, so the module stays
> compatible with Adobe Commerce Content Staging (which swaps the catalog
> primary key to `row_id`).

---

### Cron

_(README truncated for .md surface. Full README on https://packagento.com/etechflow/module-advanced-product-reviews.)_

## Recent Versions

| Version | Released |
|---|---|
| 1.1.5 | 2026-06-22 |
| 1.1.4 | 2026-06-22 |
| 1.1.2 | 2026-06-22 |
| 1.1.1 | 2026-06-22 |
| 1.0.0 | 2026-06-16 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | >=103.0.0 |
| magento/module-catalog | >=104.0.0 |
| magento/module-customer | >=103.0.0 |
| magento/module-review | >=100.4.0 |
| magento/module-sales | >=103.0.0 |
| magento/module-sales-rule | >=101.2.0 |
| magento/module-store | >=101.1.0 |
| magento/module-ui | >=101.2.0 |
| php | ~8.1.0\|\|~8.2.0\|\|~8.3.0\|\|~8.4.0 |

### Suggest

| Package | Constraint |
|---|---|
| hyva-themes/magento2-theme-module | Install on Hyvä-themed storefronts to enable the bundled Tailwind/Alpine reviews UI. Not required on Luma or other standard themes — the module detects the active theme automatically. |

## Quality

Latest release (1.1.5) 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 | – | – | not tested | not tested |


### 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 | Fail | 172 | 6 errors, 166 warnings (ruleset: Magento2) — 46 auto-fixable with phpcbf |
| PHPMD | Warning | 55 | 55 rule violations (MissingImport:21, NPathComplexity:11, CyclomaticComplexity:10, EmptyCatchBlock:6, UnusedFormalParameter:5) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 31 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 9 | valid; 9 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 | 50 | 50 | – | – |
| 2.4.8 | – | 50 | 50 | – |
| 2.4.9 | – | – | 50 | N/A |


### 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=["etechflow/module-advanced-product-reviews"],
  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

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

