# mage-os/module-advanced-widget

> Advanced cms widget module

`composer require mage-os/module-advanced-widget`

Canonical URL: https://packagento.com/mage-os/module-advanced-widget

## At a glance

- **Vendor**: mage-os (https://packagento.com/mage-os.md)
- **Latest version**: 1.2.3 — released 2026-06-26
- **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/mage-os/module-advanced-widget 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 mage-os/module-advanced-widget:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Advanced cms widget module

## README

Add configurable multi-row CMS Widgets with image picker component, product picker component, select fields and much more.

---

### Overview

The **AdvancedWidget** module allows you to define multi-row CMS widgets.
These features combined with MageOS_PageBuilderWidget module (that is explicit dependency) make finally possible to develop custom pagebuilder components with own preview and a large set of configurations.
Complex pagebuilder ui components development is no more needed.


### 🚀 Features

> 1) This module let you specify Title separators inside widgets
   ![title section](./doc/title-section_screenshot.png)

> 2) This module let you specify multiple "repeatable" sections where you can specify unlimited rows inside widgets
   ![repeatable section](./doc/repeatable-section_screenshot.png)
>
>> 2.1) Each item field can receive a dedicated tooltip
   ![repeatable section](./doc/repeatable-section-tooltip_screenshot.png)
> 
>> 2.2) Each field is validated and ask to be required for compilation
   ![repeatable section](./doc/repeatable-section-validation_screenshot.png)
>
>> 2.3) Items can be sorted
   ![repeatable section](./doc/repeatable-section-sorter_screenshot.png)
> 
>> 2.4) You can specify whether a field is editable directly in the main box or whether it must be edited in the detail modal.
   ![repeatable section](./doc/repeatable-section-row_screenshot.png)
 
> 3) Row item images fields are available
   ![image field](./doc/image-field_screenshot.png)
   ![image field selection](./doc/image-field-selection_screenshot.png)

> 4) Row item select fields are available
   ![select field](./doc/select-field_screenshot.png)

> 5) Row item product fields are available
   ![product field](./doc/product-field_screenshot.png)
   ![product field selection](./doc/product-field-selection_screenshot.png) 

 
### 🔧 Installation

1. Install it into your Mage-OS/Magento 2 project with composer:
    ```
    composer require mage-os/module-advanced-widget
    ```

2. Enable module
    ```
    bin/magento module:enable MageOS_AdvancedWidget
    bin/magento setup:upgrade
    ```

### 🤝 Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.


### 📄 License

The MIT License (MIT). Please see [License File](LICENSE) for more information.

#### Attribution

This software uses Open Source software. See the [ATTRIBUTION](ATTRIBUTION.md) page for these projects.

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### 1.2.3
#### Fixed
- Remove debugging code

### 1.2.2
#### Fixed
- Change declaration for properties

### 1.2.1
#### Fixed - Added
- Add wysiwyg and color repeatable component types
- Fix fatal error on redeclaration for properties removing protected attribute from $rawResultFactory and $getInsertImageConten. Thanks to @Sental

### 1.2.0 - 2026-04-21
#### Fixed
- PHP 8.5 compatibility: cast nullable values to string before passing to `str_replace`, `strpos`, `str_contains`, `preg_match`, `explode`, `urldecode` and similar string functions to avoid deprecation notices and fatal errors
- Cast nullable values to string/int before using as array index (PHP 8.5 null array key deprecation)
- Replace deprecated `strpos` / `strpos(..., 'http') === false` usages with `str_starts_with` / `str_contains`
- Add `declare(strict_types=1)` and missing return type hints to `Controller/Adminhtml/Image/Chooser`
- Clean up redundant `$this->escaper = $escaper ?: ObjectManager::getInstance()->get(...)` fallback in `Controller/Adminhtml/Product/Widget/Chooser` (constructor already enforces non-null Escaper)

#### Changed
- Change remaining `private` promoted/regular properties to `protected` for consistent extensibility across all classes

### 1.1.2
#### Fixed
- Fix getRowClickCallback() returning null instead of string when massaction is enabled
- Change private constructor properties to protected for extensibility

### 1.1.1
### Fixed
- Unset missing products from repeatable fields during widget configuration rendering

### 1.1.0
### Updated
- Update composer JSON making the module installable for Magento Opensource also

### 1.0.0
#### Added
- First Commit, now is possible to define CMS widgets with multiple row fields!

## Recent Versions

| Version | Released |
|---|---|
| 1.2.3 | 2026-06-26 |
| 1.2.2 | 2026-05-30 |
| 1.2.1 | 2026-05-29 |
| 1.2.0 | 2026-05-06 |
| 1.1.2 | 2026-04-16 |
| 1.1.1 | 2026-03-13 |
| 1.1.0 | 2026-03-10 |
| 1.0.1 | 2026-02-25 |
| 1.0.0 | 2025-10-11 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| mage-os/module-page-builder-widget | * |
| magento/module-page-builder | ^2.0 |
| magento/module-widget | * |
| php | ^8.1 |

## Quality

Latest release (1.2.3) 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 | Fail | 136 | 45 errors, 91 warnings (ruleset: Magento2) — 45 auto-fixable with phpcbf |
| PHPMD | Warning | 5 | 5 rule violations (IfStatementAssignment:2, UnusedFormalParameter:2, UnusedLocalVariable:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 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 | 21 | 21 | – | – |
| 2.4.8 | – | 20 | 20 | – |
| 2.4.9 | – | – | 16 | 16 |


### 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=["mage-os/module-advanced-widget"],
  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

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

