PHPackages                             iranimij/badger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. iranimij/badger

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

iranimij/badger
===============

Iranimij Badger — dynamic product badges engine for Magento 2.

00PHP

Since May 7Pushed 2mo agoCompare

[ Source](https://github.com/iranimij/badger)[ Packagist](https://packagist.org/packages/iranimij/badger)[ RSS](/packages/iranimij-badger/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Iranimij\_Badger — Product Labels for Magento 2
===============================================

[](#iranimij_badger--product-labels-for-magento-2)

A clean-room, PHP 8.1+ product-label module for Magento 2 (Community &amp; Commerce). Attach text badges, custom images, or GD-generated shapes to any product across every surface of the store — category grid, product page, cart cross-sells, and related/upsell blocks.

Features
--------

[](#features)

- **Five display surfaces** — category grid, product detail page, cart cross-sell, related products, upsell products
- **Three label types** — freeform text with inline styling, user-uploaded image, GD-generated shape (rounded rectangle, circle, ribbon)
- **Nine placement positions** — top-left through bottom-right
- **Placeholder tokens** — embed live product data (`{{price}}`, `{{discount_percent}}`, `{{sku}}`, and more) in any label text
- **Rule-based conditions** — target products by attribute value, price range, sale status, new status, stock status, category, or any combination
- **Priority &amp; exclusivity** — control which label wins when multiple apply to the same product and surface
- **Store-view &amp; customer-group scoping** — show different labels per store or logged-in segment
- **Scheduling** — `active_from` / `active_to` date ranges with automated cron activation
- **Hover tooltip** — optional tooltip bubble with configurable background/text colour
- **Use-for-parent** — bubble a child product's badge up to the configurable parent
- **REST API** — full CRUD via `/V1/iranimij-badger`
- **Flat indexer + Mview** — fast product-lookup index that stays current with price/status changes
- **Full unit-test suite** — every slice has corresponding PHPUnit tests

Requirements
------------

[](#requirements)

RequirementVersionMagento2.4.6+ (tested on 2.4.7-p4)PHP8.1+`ext-gd`Required for GD shape generationComposer2.xCompanion Module
----------------

[](#companion-module)

`Iranimij_Badger` depends on **`Iranimij_Core`** for the JSON serializer and config-provider base. Both modules ship together; see [Installation](docs/installation.md) for setup steps.

Quick Start
-----------

[](#quick-start)

```
# 1. Enable both modules
bin/magento module:enable Iranimij_Core Iranimij_Badger

# 2. Run setup
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

# 3. Open the admin
# Catalog → Badger → Manage Badgers → Add Badger
```

Documentation
-------------

[](#documentation)

DocumentDescription[Installation](docs/installation.md)Full setup, requirements, upgrading[Admin Guide](docs/admin-guide.md)Creating and managing labels[Configuration](docs/configuration.md)System config reference[Conditions](docs/conditions.md)Product condition rules[Placeholders](docs/placeholders.md)Dynamic text tokens[Frontend](docs/frontend.md)Surfaces, CSS, JS customisation[REST API](docs/api.md)API endpoints and payloads[Architecture](docs/architecture.md)Design decisions and internals[Developer Guide](docs/developer-guide.md)Extending the moduleLicense
-------

[](#license)

[OSL-3.0](https://opensource.org/licenses/OSL-3.0)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31434218?v=4)[Iman Aboheydary](/maintainers/iranimij)[@iranimij](https://github.com/iranimij)

---

Top Contributors

[![iranimij](https://avatars.githubusercontent.com/u/31434218?v=4)](https://github.com/iranimij "iranimij (1 commits)")

### Embed Badge

![Health badge](/badges/iranimij-badger/health.svg)

```
[![Health](https://phpackages.com/badges/iranimij-badger/health.svg)](https://phpackages.com/packages/iranimij-badger)
```

###  Alternatives

[digitickets/lalit

GitHub copy of LaLit's XML2Array and Array2XML

721.7M7](/packages/digitickets-lalit)[rg/phpnsc

40142.8k](/packages/rg-phpnsc)[corpsepk/yii2-dadata-suggestions-widget

DaData Suggestions jQuery widget wrapper

1043.3k](/packages/corpsepk-yii2-dadata-suggestions-widget)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
